home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / filesyst / ext2 / e2fsprog.000 / e2fsprog
Tape Archive  |  1996-05-18  |  1.4 MB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: e2fsprog

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), directory e2fsprogs-1.04/, mode 40755 , uid 36676 , gid 0 , size 0 , seconds 6146644026, user tytso, group root default
98% file data default
62% TrID TAR - Tape ARchive (GNU) default
37% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU), owner user name: "s-1.04/" default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 65 32 66 73 70 72 6f 67 | 73 2d 31 2e 30 34 2f 00 |e2fsprog|s-1.04/.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 33 36 36 |.... 407|55 . 366|
|00000070| 37 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |76 . | 0 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 36 31 34 36 36 34 34 | 0 | 6146644|
|00000090| 30 32 36 20 20 31 31 36 | 37 35 00 20 35 00 00 00 |026 116|75. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 74 79 74 73 6f 00 00 |.ustar |.tytso..|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 65 32 66 73 70 72 6f 67 | 73 2d 31 2e 30 34 2f 6c |e2fsprog|s-1.04/l|
|00000210| 69 62 2f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |ib/.....|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 33 36 36 |.... 407|55 . 366|
|00000270| 37 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |76 . | 0 . |
|00000280| 20 20 20 20 20 20 30 20 | 20 36 31 34 36 36 34 33 | 0 | 6146643|
|00000290| 33 33 34 20 20 31 32 34 | 34 34 00 20 35 00 00 00 |334 124|44. 5...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 20 20 | 00 74 79 74 73 6f 00 00 |.ustar |.tytso..|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 65 32 66 73 70 72 6f 67 | 73 2d 31 2e 30 34 2f 6c |e2fsprog|s-1.04/l|
|00000410| 69 62 2f 65 74 2f 00 00 | 00 00 00 00 00 00 00 00 |ib/et/..|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 20 34 30 37 | 35 35 20 00 20 33 36 36 |.... 407|55 . 366|
|00000470| 37 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |76 . | 0 . |
|00000480| 20 20 20 20 20 20 30 20 | 20 36 31 34 36 36 34 33 | 0 | 6146643|
|00000490| 33 33 34 20 20 31 33 30 | 35 34 00 20 35 00 00 00 |334 130|54. 5...|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 75 73 74 61 72 20 20 | 00 74 79 74 73 6f 00 00 |.ustar |.tytso..|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 65 32 66 73 70 72 6f 67 | 73 2d 31 2e 30 34 2f 6c |e2fsprog|s-1.04/l|
|00000610| 69 62 2f 65 74 2f 63 6f | 6d 5f 65 72 72 2e 33 00 |ib/et/co|m_err.3.|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 33 36 36 |....1006|44 . 366|
|00000670| 37 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |76 . | 0 . |
|00000680| 20 20 20 34 37 32 35 20 | 20 35 34 30 33 33 36 37 | 4725 | 5403367|
|00000690| 32 35 36 20 20 31 34 36 | 37 34 00 20 30 00 00 00 |256 146|74. 0...|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 75 73 74 61 72 20 20 | 00 74 79 74 73 6f 00 00 |.ustar |.tytso..|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 2e 5c 22 20 43 6f 70 79 | 72 69 67 68 74 20 28 63 |.\" Copy|right (c|
|00000810| 29 20 31 39 38 38 20 4d | 61 73 73 61 63 68 75 73 |) 1988 M|assachus|
|00000820| 65 74 74 73 20 49 6e 73 | 74 69 74 75 74 65 20 6f |etts Ins|titute o|
|00000830| 66 20 54 65 63 68 6e 6f | 6c 6f 67 79 2c 0a 2e 5c |f Techno|logy,..\|
|00000840| 22 20 53 74 75 64 65 6e | 74 20 49 6e 66 6f 72 6d |" Studen|t Inform|
|00000850| 61 74 69 6f 6e 20 50 72 | 6f 63 65 73 73 69 6e 67 |ation Pr|ocessing|
|00000860| 20 42 6f 61 72 64 2e 20 | 20 41 6c 6c 20 72 69 67 | Board. | All rig|
|00000870| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 0a 2e 5c |hts rese|rved...\|
|00000880| 22 0a 2e 5c 22 20 24 48 | 65 61 64 65 72 3a 20 2f |"..\" $H|eader: /|
|00000890| 6d 69 74 2f 6b 72 62 35 | 2f 2e 63 76 73 72 6f 6f |mit/krb5|/.cvsroo|
|000008a0| 74 2f 73 72 63 2f 75 74 | 69 6c 2f 65 74 2f 63 6f |t/src/ut|il/et/co|
|000008b0| 6d 5f 65 72 72 2e 33 2c | 76 20 31 2e 31 20 31 39 |m_err.3,|v 1.1 19|
|000008c0| 39 33 2f 30 36 2f 30 33 | 20 31 32 3a 32 39 3a 33 |93/06/03| 12:29:3|
|000008d0| 34 20 74 79 74 73 6f 20 | 45 78 70 20 24 0a 2e 5c |4 tytso |Exp $..\|
|000008e0| 22 0a 2e 54 48 20 43 4f | 4d 5f 45 52 52 20 33 20 |"..TH CO|M_ERR 3 |
|000008f0| 22 32 32 20 4e 6f 76 20 | 31 39 38 38 22 20 53 49 |"22 Nov |1988" SI|
|00000900| 50 42 0a 2e 53 48 20 4e | 41 4d 45 0a 63 6f 6d 5f |PB..SH N|AME.com_|
|00000910| 65 72 72 20 5c 2d 20 63 | 6f 6d 6d 6f 6e 20 65 72 |err \- c|ommon er|
|00000920| 72 6f 72 20 64 69 73 70 | 6c 61 79 20 72 6f 75 74 |ror disp|lay rout|
|00000930| 69 6e 65 0a 2e 53 48 20 | 53 59 4e 4f 50 53 49 53 |ine..SH |SYNOPSIS|
|00000940| 0a 2e 6e 66 0a 20 23 69 | 6e 63 6c 75 64 65 20 3c |..nf. #i|nclude <|
|00000950| 63 6f 6d 5f 65 72 72 2e | 68 3e 0a 2e 50 50 0a 76 |com_err.|h>..PP.v|
|00000960| 6f 69 64 20 63 6f 6d 5f | 65 72 72 20 28 77 68 6f |oid com_|err (who|
|00000970| 61 6d 69 2c 20 63 6f 64 | 65 2c 20 66 6f 72 6d 61 |ami, cod|e, forma|
|00000980| 74 2c 20 2e 2e 2e 29 3b | 0a 09 63 6f 6e 73 74 20 |t, ...);|..const |
|00000990| 63 68 61 72 20 2a 77 68 | 6f 61 6d 69 3b 0a 09 6c |char *wh|oami;..l|
|000009a0| 6f 6e 67 20 63 6f 64 65 | 3b 0a 09 63 6f 6e 73 74 |ong code|;..const|
|000009b0| 20 63 68 61 72 20 2a 66 | 6f 72 6d 61 74 3b 0a 2e | char *f|ormat;..|
|000009c0| 50 50 0a 70 72 6f 63 20 | 3d 20 73 65 74 5f 63 6f |PP.proc |= set_co|
|000009d0| 6d 5f 65 72 72 5f 68 6f | 6f 6b 20 28 70 72 6f 63 |m_err_ho|ok (proc|
|000009e0| 29 3b 0a 2e 66 69 0a 76 | 6f 69 64 20 28 2a 0a 2e |);..fi.v|oid (*..|
|000009f0| 49 20 70 72 6f 63 0a 29 | 20 28 63 6f 6e 73 74 20 |I proc.)| (const |
|00000a00| 63 68 61 72 20 2a 2c 20 | 6c 6f 6e 67 2c 20 63 6f |char *, |long, co|
|00000a10| 6e 73 74 20 63 68 61 72 | 20 2a 2c 20 76 61 5f 6c |nst char| *, va_l|
|00000a20| 69 73 74 29 3b 0a 2e 6e | 66 0a 2e 50 50 0a 70 72 |ist);..n|f..PP.pr|
|00000a30| 6f 63 20 3d 20 72 65 73 | 65 74 5f 63 6f 6d 5f 65 |oc = res|et_com_e|
|00000a40| 72 72 5f 68 6f 6f 6b 20 | 28 29 3b 0a 2e 50 50 0a |rr_hook |();..PP.|
|00000a50| 76 6f 69 64 20 69 6e 69 | 74 69 61 6c 69 7a 65 5f |void ini|tialize_|
|00000a60| 58 58 58 58 5f 65 72 72 | 6f 72 5f 74 61 62 6c 65 |XXXX_err|or_table|
|00000a70| 20 28 29 3b 0a 2e 66 69 | 0a 2e 53 48 20 44 45 53 | ();..fi|..SH DES|
|00000a80| 43 52 49 50 54 49 4f 4e | 0a 2e 49 20 43 6f 6d 5f |CRIPTION|..I Com_|
|00000a90| 65 72 72 0a 64 69 73 70 | 6c 61 79 73 20 61 6e 20 |err.disp|lays an |
|00000aa0| 65 72 72 6f 72 20 6d 65 | 73 73 61 67 65 20 6f 6e |error me|ssage on|
|00000ab0| 20 74 68 65 20 73 74 61 | 6e 64 61 72 64 20 65 72 | the sta|ndard er|
|00000ac0| 72 6f 72 20 73 74 72 65 | 61 6d 0a 2e 49 20 73 74 |ror stre|am..I st|
|00000ad0| 64 65 72 72 0a 28 73 65 | 65 0a 2e 49 52 20 73 74 |derr.(se|e..IR st|
|00000ae0| 64 69 6f 20 28 33 53 29 | 29 0a 63 6f 6d 70 6f 73 |dio (3S)|).compos|
|00000af0| 65 64 20 6f 66 20 74 68 | 65 0a 2e 49 20 77 68 6f |ed of th|e..I who|
|00000b00| 61 6d 69 0a 73 74 72 69 | 6e 67 2c 20 77 68 69 63 |ami.stri|ng, whic|
|00000b10| 68 20 73 68 6f 75 6c 64 | 20 73 70 65 63 69 66 79 |h should| specify|
|00000b20| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 6e 61 6d | the pro|gram nam|
|00000b30| 65 20 6f 72 20 73 6f 6d | 65 20 73 75 62 70 6f 72 |e or som|e subpor|
|00000b40| 74 69 6f 6e 20 6f 66 0a | 61 20 70 72 6f 67 72 61 |tion of.|a progra|
|00000b50| 6d 2c 20 66 6f 6c 6c 6f | 77 65 64 20 62 79 20 61 |m, follo|wed by a|
|00000b60| 6e 20 65 72 72 6f 72 20 | 6d 65 73 73 61 67 65 20 |n error |message |
|00000b70| 67 65 6e 65 72 61 74 65 | 64 20 66 72 6f 6d 20 74 |generate|d from t|
|00000b80| 68 65 0a 2e 49 20 63 6f | 64 65 0a 76 61 6c 75 65 |he..I co|de.value|
|00000b90| 20 28 64 65 72 69 76 65 | 64 20 66 72 6f 6d 0a 2e | (derive|d from..|
|00000ba0| 49 52 20 63 6f 6d 70 69 | 6c 65 5f 65 74 20 28 31 |IR compi|le_et (1|
|00000bb0| 29 29 2c 0a 61 6e 64 20 | 61 20 73 74 72 69 6e 67 |)),.and |a string|
|00000bc0| 20 70 72 6f 64 75 63 65 | 64 20 75 73 69 6e 67 20 | produce|d using |
|00000bd0| 74 68 65 0a 2e 49 20 66 | 6f 72 6d 61 74 0a 73 74 |the..I f|ormat.st|
|00000be0| 72 69 6e 67 20 61 6e 64 | 20 61 6e 79 20 66 6f 6c |ring and| any fol|
|00000bf0| 6c 6f 77 69 6e 67 20 61 | 72 67 75 6d 65 6e 74 73 |lowing a|rguments|
|00000c00| 2c 20 69 6e 20 74 68 65 | 20 73 61 6d 65 20 73 74 |, in the| same st|
|00000c10| 79 6c 65 20 61 73 0a 2e | 49 52 20 66 70 72 69 6e |yle as..|IR fprin|
|00000c20| 74 66 20 28 33 29 2e 0a | 0a 54 68 65 20 62 65 68 |tf (3)..|.The beh|
|00000c30| 61 76 69 6f 72 20 6f 66 | 0a 2e 49 20 63 6f 6d 5f |avior of|..I com_|
|00000c40| 65 72 72 0a 63 61 6e 20 | 62 65 20 6d 6f 64 69 66 |err.can |be modif|
|00000c50| 69 65 64 20 75 73 69 6e | 67 0a 2e 49 20 73 65 74 |ied usin|g..I set|
|00000c60| 5f 63 6f 6d 5f 65 72 72 | 5f 68 6f 6f 6b 3b 0a 74 |_com_err|_hook;.t|
|00000c70| 68 69 73 20 64 65 66 69 | 6e 65 73 20 61 20 70 72 |his defi|nes a pr|
|00000c80| 6f 63 65 64 75 72 65 20 | 77 68 69 63 68 20 69 73 |ocedure |which is|
|00000c90| 20 63 61 6c 6c 65 64 20 | 77 69 74 68 20 74 68 65 | called |with the|
|00000ca0| 20 61 72 67 75 6d 65 6e | 74 73 20 70 61 73 73 65 | argumen|ts passe|
|00000cb0| 64 20 74 6f 0a 2e 49 20 | 63 6f 6d 5f 65 72 72 2c |d to..I |com_err,|
|00000cc0| 0a 69 6e 73 74 65 61 64 | 20 6f 66 20 74 68 65 20 |.instead| of the |
|00000cd0| 64 65 66 61 75 6c 74 20 | 69 6e 74 65 72 6e 61 6c |default |internal|
|00000ce0| 20 70 72 6f 63 65 64 75 | 72 65 20 77 68 69 63 68 | procedu|re which|
|00000cf0| 20 73 65 6e 64 73 20 74 | 68 65 20 66 6f 72 6d 61 | sends t|he forma|
|00000d00| 74 74 65 64 0a 74 65 78 | 74 20 74 6f 20 65 72 72 |tted.tex|t to err|
|00000d10| 6f 72 20 6f 75 74 70 75 | 74 2e 20 20 54 68 75 73 |or outpu|t. Thus|
|00000d20| 20 74 68 65 20 65 72 72 | 6f 72 20 6d 65 73 73 61 | the err|or messa|
|00000d30| 67 65 73 20 66 72 6f 6d | 20 61 20 70 72 6f 67 72 |ges from| a progr|
|00000d40| 61 6d 20 63 61 6e 20 61 | 6c 6c 0a 65 61 73 69 6c |am can a|ll.easil|
|00000d50| 79 20 62 65 20 64 69 76 | 65 72 74 65 64 20 74 6f |y be div|erted to|
|00000d60| 20 61 6e 6f 74 68 65 72 | 20 66 6f 72 6d 20 6f 66 | another| form of|
|00000d70| 20 64 69 61 67 6e 6f 73 | 74 69 63 20 6c 6f 67 67 | diagnos|tic logg|
|00000d80| 69 6e 67 2c 20 73 75 63 | 68 20 61 73 0a 2e 49 52 |ing, suc|h as..IR|
|00000d90| 20 73 79 73 6c 6f 67 20 | 28 33 29 2e 0a 2e 49 20 | syslog |(3)...I |
|00000da0| 52 65 73 65 74 5f 63 6f | 6d 5f 65 72 72 5f 68 6f |Reset_co|m_err_ho|
|00000db0| 6f 6b 0a 6d 61 79 20 62 | 65 20 75 73 65 64 20 74 |ok.may b|e used t|
|00000dc0| 6f 20 72 65 73 74 6f 72 | 65 20 74 68 65 20 62 65 |o restor|e the be|
|00000dd0| 68 61 76 69 6f 72 20 6f | 66 0a 2e 49 20 63 6f 6d |havior o|f..I com|
|00000de0| 5f 65 72 72 0a 74 6f 20 | 69 74 73 20 64 65 66 61 |_err.to |its defa|
|00000df0| 75 6c 74 20 66 6f 72 6d | 2e 20 20 42 6f 74 68 20 |ult form|. Both |
|00000e00| 70 72 6f 63 65 64 75 72 | 65 73 20 72 65 74 75 72 |procedur|es retur|
|00000e10| 6e 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 60 |n the pr|evious `|
|00000e20| 60 68 6f 6f 6b 27 27 0a | 76 61 6c 75 65 2e 20 20 |`hook''.|value. |
|00000e30| 54 68 65 73 65 20 60 60 | 68 6f 6f 6b 27 27 20 70 |These ``|hook'' p|
|00000e40| 72 6f 63 65 64 75 72 65 | 73 20 6d 75 73 74 20 68 |rocedure|s must h|
|00000e50| 61 76 65 20 74 68 65 20 | 64 65 63 6c 61 72 61 74 |ave the |declarat|
|00000e60| 69 6f 6e 20 67 69 76 65 | 6e 20 66 6f 72 0a 2e 49 |ion give|n for..I|
|00000e70| 20 70 72 6f 63 0a 61 62 | 6f 76 65 20 69 6e 20 74 | proc.ab|ove in t|
|00000e80| 68 65 20 73 79 6e 6f 70 | 73 69 73 2e 0a 0a 54 68 |he synop|sis...Th|
|00000e90| 65 0a 2e 49 20 69 6e 69 | 74 69 61 6c 69 7a 65 5f |e..I ini|tialize_|
|00000ea0| 58 58 58 58 5f 65 72 72 | 6f 72 5f 74 61 62 6c 65 |XXXX_err|or_table|
|00000eb0| 0a 72 6f 75 74 69 6e 65 | 20 69 73 20 67 65 6e 65 |.routine| is gene|
|00000ec0| 72 61 74 65 64 20 6d 65 | 63 68 61 6e 69 63 61 6c |rated me|chanical|
|00000ed0| 6c 79 20 62 79 0a 2e 49 | 52 20 63 6f 6d 70 69 6c |ly by..I|R compil|
|00000ee0| 65 5f 65 74 20 28 31 29 | 0a 66 72 6f 6d 20 61 20 |e_et (1)|.from a |
|00000ef0| 73 6f 75 72 63 65 20 66 | 69 6c 65 20 63 6f 6e 74 |source f|ile cont|
|00000f00| 61 69 6e 69 6e 67 20 6e | 61 6d 65 73 20 61 6e 64 |aining n|ames and|
|00000f10| 20 61 73 73 6f 63 69 61 | 74 65 64 20 73 74 72 69 | associa|ted stri|
|00000f20| 6e 67 73 2e 20 20 45 61 | 63 68 0a 74 61 62 6c 65 |ngs. Ea|ch.table|
|00000f30| 20 68 61 73 20 61 20 6e | 61 6d 65 20 6f 66 20 75 | has a n|ame of u|
|00000f40| 70 20 74 6f 20 66 6f 75 | 72 20 63 68 61 72 61 63 |p to fou|r charac|
|00000f50| 74 65 72 73 2c 20 77 68 | 69 63 68 20 69 73 20 75 |ters, wh|ich is u|
|00000f60| 73 65 64 20 69 6e 20 70 | 6c 61 63 65 20 6f 66 0a |sed in p|lace of.|
|00000f70| 74 68 65 0a 2e 42 20 58 | 58 58 58 0a 69 6e 20 74 |the..B X|XXX.in t|
|00000f80| 68 65 20 6e 61 6d 65 20 | 6f 66 20 74 68 65 20 72 |he name |of the r|
|00000f90| 6f 75 74 69 6e 65 2e 20 | 20 54 68 65 73 65 20 72 |outine. | These r|
|00000fa0| 6f 75 74 69 6e 65 73 20 | 73 68 6f 75 6c 64 20 62 |outines |should b|
|00000fb0| 65 20 63 61 6c 6c 65 64 | 20 62 65 66 6f 72 65 0a |e called| before.|
|00000fc0| 61 6e 79 20 6f 66 20 74 | 68 65 20 63 6f 72 72 65 |any of t|he corre|
|00000fd0| 73 70 6f 6e 64 69 6e 67 | 20 65 72 72 6f 72 20 63 |sponding| error c|
|00000fe0| 6f 64 65 73 20 61 72 65 | 20 75 73 65 64 2c 20 73 |odes are| used, s|
|00000ff0| 6f 20 74 68 61 74 20 74 | 68 65 0a 2e 49 20 63 6f |o that t|he..I co|
|00001000| 6d 5f 65 72 72 0a 6c 69 | 62 72 61 72 79 20 77 69 |m_err.li|brary wi|
|00001010| 6c 6c 20 72 65 63 6f 67 | 6e 69 7a 65 20 65 72 72 |ll recog|nize err|
|00001020| 6f 72 20 63 6f 64 65 73 | 20 66 72 6f 6d 20 74 68 |or codes| from th|
|00001030| 65 73 65 20 74 61 62 6c | 65 73 20 77 68 65 6e 20 |ese tabl|es when |
|00001040| 74 68 65 79 20 61 72 65 | 0a 75 73 65 64 2e 0a 0a |they are|.used...|
|00001050| 54 68 65 0a 2e 42 20 63 | 6f 6d 5f 65 72 72 2e 68 |The..B c|om_err.h|
|00001060| 0a 68 65 61 64 65 72 20 | 66 69 6c 65 20 73 68 6f |.header |file sho|
|00001070| 75 6c 64 20 62 65 20 69 | 6e 63 6c 75 64 65 64 20 |uld be i|ncluded |
|00001080| 69 6e 20 61 6e 79 20 73 | 6f 75 72 63 65 20 66 69 |in any s|ource fi|
|00001090| 6c 65 20 74 68 61 74 20 | 75 73 65 73 20 72 6f 75 |le that |uses rou|
|000010a0| 74 69 6e 65 73 0a 66 72 | 6f 6d 20 74 68 65 0a 2e |tines.fr|om the..|
|000010b0| 49 20 63 6f 6d 5f 65 72 | 72 0a 6c 69 62 72 61 72 |I com_er|r.librar|
|000010c0| 79 3b 20 65 78 65 63 75 | 74 61 62 6c 65 20 66 69 |y; execu|table fi|
|000010d0| 6c 65 73 20 6d 75 73 74 | 20 62 65 20 6c 69 6e 6b |les must| be link|
|000010e0| 65 64 20 75 73 69 6e 67 | 0a 2e 49 20 60 60 2d 6c |ed using|..I ``-l|
|000010f0| 63 6f 6d 5f 65 72 72 27 | 27 0a 69 6e 20 6f 72 64 |com_err'|'.in ord|
|00001100| 65 72 20 74 6f 20 63 61 | 75 73 65 20 74 68 65 0a |er to ca|use the.|
|00001110| 2e 49 20 63 6f 6d 5f 65 | 72 72 0a 6c 69 62 72 61 |.I com_e|rr.libra|
|00001120| 72 79 20 74 6f 20 62 65 | 20 69 6e 63 6c 75 64 65 |ry to be| include|
|00001130| 64 2e 0a 0a 2e 5c 22 20 | 2e 49 52 20 66 6f 72 20 |d....\" |.IR for |
|00001140| 6d 61 6e 75 61 6c 20 65 | 6e 74 72 69 65 73 0a 2e |manual e|ntries..|
|00001150| 5c 22 20 2e 50 50 20 66 | 6f 72 20 70 61 72 61 67 |\" .PP f|or parag|
|00001160| 72 61 70 68 20 62 72 65 | 61 6b 73 0a 0a 2e 53 48 |raph bre|aks...SH|
|00001170| 20 22 53 45 45 20 41 4c | 53 4f 22 0a 63 6f 6d 70 | "SEE AL|SO".comp|
|00001180| 69 6c 65 5f 65 74 20 28 | 31 29 2c 20 73 79 73 6c |ile_et (|1), sysl|
|00001190| 6f 67 20 28 33 29 2e 0a | 0a 4b 65 6e 20 52 61 65 |og (3)..|.Ken Rae|
|000011a0| 62 75 72 6e 2c 20 22 41 | 20 43 6f 6d 6d 6f 6e 20 |burn, "A| Common |
|000011b0| 45 72 72 6f 72 20 44 65 | 73 63 72 69 70 74 69 6f |Error De|scriptio|
|000011c0| 6e 20 4c 69 62 72 61 72 | 79 20 66 6f 72 20 55 4e |n Librar|y for UN|
|000011d0| 49 58 22 2e 0a 00 00 00 | 00 00 00 00 00 00 00 00 |IX".....|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 65 32 66 73 70 72 6f 67 | 73 2d 31 2e 30 34 2f 6c |e2fsprog|s-1.04/l|
|00001210| 69 62 2f 65 74 2f 63 6f | 6d 5f 65 72 72 2e 63 00 |ib/et/co|m_err.c.|
|00001220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001260| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 33 36 36 |....1006|44 . 366|
|00001270| 37 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |76 . | 0 . |
|00001280| 20 20 20 34 33 32 33 20 | 20 35 36 33 33 37 34 34 | 4323 | 5633744|
|00001290| 35 37 31 20 20 31 34 37 | 35 32 00 20 30 00 00 00 |571 147|52. 0...|
|000012a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000012f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001300| 00 75 73 74 61 72 20 20 | 00 74 79 74 73 6f 00 00 |.ustar |.tytso..|
|00001310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001320| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00001330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000013f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001400| 2f 2a 0a 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00001410| 31 39 38 37 2c 20 31 39 | 38 38 20 62 79 20 4d 49 |1987, 19|88 by MI|
|00001420| 54 20 53 74 75 64 65 6e | 74 20 49 6e 66 6f 72 6d |T Studen|t Inform|
|00001430| 61 74 69 6f 6e 20 50 72 | 6f 63 65 73 73 69 6e 67 |ation Pr|ocessing|
|00001440| 20 42 6f 61 72 64 2e 0a | 20 2a 0a 20 2a 20 46 6f | Board..| *. * Fo|
|00001450| 72 20 63 6f 70 79 72 69 | 67 68 74 20 69 6e 66 6f |r copyri|ght info|
|00001460| 2c 20 73 65 65 20 6d 69 | 74 2d 73 69 70 62 2d 63 |, see mi|t-sipb-c|
|00001470| 6f 70 79 72 69 67 68 74 | 2e 68 2e 0a 20 2a 2f 0a |opyright|.h.. */.|
|00001480| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|00001490| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 22 63 6f |.h>.#inc|lude "co|
|000014a0| 6d 5f 65 72 72 2e 68 22 | 0a 23 69 6e 63 6c 75 64 |m_err.h"|.#includ|
|000014b0| 65 20 22 6d 69 74 2d 73 | 69 70 62 2d 63 6f 70 79 |e "mit-s|ipb-copy|
|000014c0| 72 69 67 68 74 2e 68 22 | 0a 23 69 6e 63 6c 75 64 |right.h"|.#includ|
|000014d0| 65 20 22 65 72 72 6f 72 | 5f 74 61 62 6c 65 2e 68 |e "error|_table.h|
|000014e0| 22 0a 23 69 6e 63 6c 75 | 64 65 20 22 69 6e 74 65 |".#inclu|de "inte|
|000014f0| 72 6e 61 6c 2e 68 22 0a | 0a 23 69 66 20 21 64 65 |rnal.h".|.#if !de|
|00001500| 66 69 6e 65 64 28 5f 5f | 53 54 44 43 5f 5f 29 20 |fined(__|STDC__) |
|00001510| 26 26 20 21 64 65 66 69 | 6e 65 64 28 53 54 44 41 |&& !defi|ned(STDA|
|00001520| 52 47 5f 50 52 4f 54 4f | 54 59 50 45 53 29 0a 23 |RG_PROTO|TYPES).#|
|00001530| 69 6e 63 6c 75 64 65 20 | 3c 76 61 72 61 72 67 73 |include |<varargs|
|00001540| 2e 68 3e 0a 23 64 65 66 | 69 6e 65 20 56 41 52 41 |.h>.#def|ine VARA|
|00001550| 52 47 53 0a 23 65 6e 64 | 69 66 0a 0a 73 74 61 74 |RGS.#end|if..stat|
|00001560| 69 63 20 76 6f 69 64 0a | 23 69 66 64 65 66 20 5f |ic void.|#ifdef _|
|00001570| 5f 53 54 44 43 5f 5f 0a | 20 20 20 20 64 65 66 61 |_STDC__.| defa|
|00001580| 75 6c 74 5f 63 6f 6d 5f | 65 72 72 5f 70 72 6f 63 |ult_com_|err_proc|
|00001590| 20 28 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 77 68 | (const |char *wh|
|000015a0| 6f 61 6d 69 2c 20 65 72 | 72 63 6f 64 65 5f 74 20 |oami, er|rcode_t |
|000015b0| 63 6f 64 65 2c 20 63 6f | 6e 73 74 0a 09 09 09 20 |code, co|nst.... |
|000015c0| 20 63 68 61 72 20 2a 66 | 6d 74 2c 20 76 61 5f 6c | char *f|mt, va_l|
|000015d0| 69 73 74 20 61 72 67 73 | 29 0a 23 65 6c 73 65 0a |ist args|).#else.|
|000015e0| 20 20 20 20 64 65 66 61 | 75 6c 74 5f 63 6f 6d 5f | defa|ult_com_|
|000015f0| 65 72 72 5f 70 72 6f 63 | 20 28 77 68 6f 61 6d 69 |err_proc| (whoami|
|00001600| 2c 20 63 6f 64 65 2c 20 | 66 6d 74 2c 20 61 72 67 |, code, |fmt, arg|
|00001610| 73 29 0a 20 20 20 20 63 | 6f 6e 73 74 20 63 68 61 |s). c|onst cha|
|00001620| 72 20 2a 77 68 6f 61 6d | 69 3b 0a 20 20 20 20 65 |r *whoam|i;. e|
|00001630| 72 72 63 6f 64 65 5f 74 | 20 63 6f 64 65 3b 0a 20 |rrcode_t| code;. |
|00001640| 20 20 20 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 66 | const| char *f|
|00001650| 6d 74 3b 0a 20 20 20 20 | 76 61 5f 6c 69 73 74 20 |mt;. |va_list |
|00001660| 61 72 67 73 3b 0a 23 65 | 6e 64 69 66 0a 7b 0a 20 |args;.#e|ndif.{. |
|00001670| 20 20 20 69 66 20 28 77 | 68 6f 61 6d 69 29 20 7b | if (w|hoami) {|
|00001680| 0a 09 66 70 75 74 73 28 | 77 68 6f 61 6d 69 2c 20 |..fputs(|whoami, |
|00001690| 73 74 64 65 72 72 29 3b | 0a 09 66 70 75 74 73 28 |stderr);|..fputs(|
|000016a0| 22 3a 20 22 2c 20 73 74 | 64 65 72 72 29 3b 0a 20 |": ", st|derr);. |
|000016b0| 20 20 20 7d 0a 20 20 20 | 20 69 66 20 28 63 6f 64 | }. | if (cod|
|000016c0| 65 29 20 7b 0a 09 66 70 | 75 74 73 28 65 72 72 6f |e) {..fp|uts(erro|
|000016d0| 72 5f 6d 65 73 73 61 67 | 65 28 63 6f 64 65 29 2c |r_messag|e(code),|
|000016e0| 20 73 74 64 65 72 72 29 | 3b 0a 09 66 70 75 74 73 | stderr)|;..fputs|
|000016f0| 28 22 20 22 2c 20 73 74 | 64 65 72 72 29 3b 0a 20 |(" ", st|derr);. |
|00001700| 20 20 20 7d 0a 20 20 20 | 20 69 66 20 28 66 6d 74 | }. | if (fmt|
|00001710| 29 20 7b 0a 20 20 20 20 | 20 20 20 20 76 66 70 72 |) {. | vfpr|
|00001720| 69 6e 74 66 20 28 73 74 | 64 65 72 72 2c 20 66 6d |intf (st|derr, fm|
|00001730| 74 2c 20 61 72 67 73 29 | 3b 0a 20 20 20 20 7d 0a |t, args)|;. }.|
|00001740| 20 20 20 20 2f 2a 20 73 | 68 6f 75 6c 64 20 64 6f | /* s|hould do|
|00001750| 20 74 68 69 73 20 6f 6e | 6c 79 20 6f 6e 20 61 20 | this on|ly on a |
|00001760| 74 74 79 20 69 6e 20 72 | 61 77 20 6d 6f 64 65 20 |tty in r|aw mode |
|00001770| 2a 2f 0a 20 20 20 20 70 | 75 74 63 28 27 5c 72 27 |*/. p|utc('\r'|
|00001780| 2c 20 73 74 64 65 72 72 | 29 3b 0a 20 20 20 20 70 |, stderr|);. p|
|00001790| 75 74 63 28 27 5c 6e 27 | 2c 20 73 74 64 65 72 72 |utc('\n'|, stderr|
|000017a0| 29 3b 0a 20 20 20 20 66 | 66 6c 75 73 68 28 73 74 |);. f|flush(st|
|000017b0| 64 65 72 72 29 3b 0a 7d | 0a 0a 23 69 66 64 65 66 |derr);.}|..#ifdef|
|000017c0| 20 5f 5f 53 54 44 43 5f | 5f 0a 74 79 70 65 64 65 | __STDC_|_.typede|
|000017d0| 66 20 76 6f 69 64 20 28 | 2a 65 72 72 66 29 20 28 |f void (|*errf) (|
|000017e0| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 2c 20 65 72 |const ch|ar *, er|
|000017f0| 72 63 6f 64 65 5f 74 2c | 20 63 6f 6e 73 74 20 63 |rcode_t,| const c|
|00001800| 68 61 72 20 2a 2c 20 76 | 61 5f 6c 69 73 74 29 3b |har *, v|a_list);|
|00001810| 0a 23 65 6c 73 65 0a 74 | 79 70 65 64 65 66 20 76 |.#else.t|ypedef v|
|00001820| 6f 69 64 20 28 2a 65 72 | 72 66 29 20 28 29 3b 0a |oid (*er|rf) ();.|
|00001830| 23 65 6e 64 69 66 0a 0a | 65 72 72 66 20 63 6f 6d |#endif..|errf com|
|00001840| 5f 65 72 72 5f 68 6f 6f | 6b 20 3d 20 64 65 66 61 |_err_hoo|k = defa|
|00001850| 75 6c 74 5f 63 6f 6d 5f | 65 72 72 5f 70 72 6f 63 |ult_com_|err_proc|
|00001860| 3b 0a 0a 23 69 66 64 65 | 66 20 5f 5f 53 54 44 43 |;..#ifde|f __STDC|
|00001870| 5f 5f 0a 76 6f 69 64 20 | 63 6f 6d 5f 65 72 72 5f |__.void |com_err_|
|00001880| 76 61 20 28 63 6f 6e 73 | 74 20 63 68 61 72 20 2a |va (cons|t char *|
|00001890| 77 68 6f 61 6d 69 2c 20 | 65 72 72 63 6f 64 65 5f |whoami, |errcode_|
|000018a0| 74 20 63 6f 64 65 2c 20 | 63 6f 6e 73 74 20 63 68 |t code, |const ch|
|000018b0| 61 72 20 2a 66 6d 74 2c | 0a 09 09 20 76 61 5f 6c |ar *fmt,|... va_l|
|000018c0| 69 73 74 20 61 72 67 73 | 29 0a 23 65 6c 73 65 0a |ist args|).#else.|
|000018d0| 76 6f 69 64 20 63 6f 6d | 5f 65 72 72 5f 76 61 20 |void com|_err_va |
|000018e0| 28 77 68 6f 61 6d 69 2c | 20 63 6f 64 65 2c 20 66 |(whoami,| code, f|
|000018f0| 6d 74 2c 20 61 72 67 73 | 29 0a 20 20 20 20 63 6f |mt, args|). co|
|00001900| 6e 73 74 20 63 68 61 72 | 20 2a 77 68 6f 61 6d 69 |nst char| *whoami|
|00001910| 3b 0a 20 20 20 20 65 72 | 72 63 6f 64 65 5f 74 20 |;. er|rcode_t |
|00001920| 63 6f 64 65 3b 0a 20 20 | 20 20 63 6f 6e 73 74 20 |code;. | const |
|00001930| 63 68 61 72 20 2a 66 6d | 74 3b 0a 20 20 20 20 76 |char *fm|t;. v|
|00001940| 61 5f 6c 69 73 74 20 61 | 72 67 73 3b 0a 23 65 6e |a_list a|rgs;.#en|
|00001950| 64 69 66 0a 7b 0a 20 20 | 20 20 28 2a 63 6f 6d 5f |dif.{. | (*com_|
|00001960| 65 72 72 5f 68 6f 6f 6b | 29 20 28 77 68 6f 61 6d |err_hook|) (whoam|
|00001970| 69 2c 20 63 6f 64 65 2c | 20 66 6d 74 2c 20 61 72 |i, code,| fmt, ar|
|00001980| 67 73 29 3b 0a 7d 0a 0a | 23 69 66 6e 64 65 66 20 |gs);.}..|#ifndef |
|00001990| 56 41 52 41 52 47 53 0a | 76 6f 69 64 20 63 6f 6d |VARARGS.|void com|
|000019a0| 5f 65 72 72 20 28 63 6f | 6e 73 74 20 63 68 61 72 |_err (co|nst char|
|000019b0| 20 2a 77 68 6f 61 6d 69 | 2c 0a 09 20 20 20 20 20 | *whoami|,.. |
|000019c0| 20 65 72 72 63 6f 64 65 | 5f 74 20 63 6f 64 65 2c | errcode|_t code,|
|000019d0| 0a 09 20 20 20 20 20 20 | 63 6f 6e 73 74 20 63 68 |.. |const ch|
|000019e0| 61 72 20 2a 66 6d 74 2c | 20 2e 2e 2e 29 0a 7b 0a |ar *fmt,| ...).{.|
|000019f0| 23 65 6c 73 65 0a 76 6f | 69 64 20 63 6f 6d 5f 65 |#else.vo|id com_e|
|00001a00| 72 72 20 28 76 61 5f 61 | 6c 69 73 74 29 0a 20 20 |rr (va_a|list). |
|00001a10| 20 20 76 61 5f 64 63 6c | 0a 7b 0a 20 20 20 20 63 | va_dcl|.{. c|
|00001a20| 6f 6e 73 74 20 63 68 61 | 72 20 2a 77 68 6f 61 6d |onst cha|r *whoam|
|00001a30| 69 2c 20 2a 66 6d 74 3b | 0a 20 20 20 20 65 72 72 |i, *fmt;|. err|
|00001a40| 63 6f 64 65 5f 74 20 63 | 6f 64 65 3b 0a 23 65 6e |code_t c|ode;.#en|
|00001a50| 64 69 66 0a 20 20 20 20 | 76 61 5f 6c 69 73 74 20 |dif. |va_list |
|00001a60| 70 76 61 72 3b 0a 0a 20 | 20 20 20 69 66 20 28 21 |pvar;.. | if (!|
|00001a70| 63 6f 6d 5f 65 72 72 5f | 68 6f 6f 6b 29 0a 09 63 |com_err_|hook)..c|
|00001a80| 6f 6d 5f 65 72 72 5f 68 | 6f 6f 6b 20 3d 20 64 65 |om_err_h|ook = de|
|00001a90| 66 61 75 6c 74 5f 63 6f | 6d 5f 65 72 72 5f 70 72 |fault_co|m_err_pr|
|00001aa0| 6f 63 3b 0a 23 69 66 64 | 65 66 20 56 41 52 41 52 |oc;.#ifd|ef VARAR|
|00001ab0| 47 53 0a 20 20 20 20 76 | 61 5f 73 74 61 72 74 20 |GS. v|a_start |
|00001ac0| 28 70 76 61 72 29 3b 0a | 20 20 20 20 77 68 6f 61 |(pvar);.| whoa|
|00001ad0| 6d 69 20 3d 20 76 61 5f | 61 72 67 20 28 70 76 61 |mi = va_|arg (pva|
|00001ae0| 72 2c 20 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 29 |r, const| char *)|
|00001af0| 3b 0a 20 20 20 20 63 6f | 64 65 20 3d 20 76 61 5f |;. co|de = va_|
|00001b00| 61 72 67 20 28 70 76 61 | 72 2c 20 65 72 72 63 6f |arg (pva|r, errco|
|00001b10| 64 65 5f 74 29 3b 0a 20 | 20 20 20 66 6d 74 20 3d |de_t);. | fmt =|
|00001b20| 20 76 61 5f 61 72 67 20 | 28 70 76 61 72 2c 20 63 | va_arg |(pvar, c|
|00001b30| 6f 6e 73 74 20 63 68 61 | 72 20 2a 29 3b 0a 23 65 |onst cha|r *);.#e|
|00001b40| 6c 73 65 0a 20 20 20 20 | 76 61 5f 73 74 61 72 74 |lse. |va_start|
|00001b50| 28 70 76 61 72 2c 20 66 | 6d 74 29 3b 0a 23 65 6e |(pvar, f|mt);.#en|
|00001b60| 64 69 66 0a 20 20 20 20 | 63 6f 6d 5f 65 72 72 5f |dif. |com_err_|
|00001b70| 76 61 20 28 77 68 6f 61 | 6d 69 2c 20 63 6f 64 65 |va (whoa|mi, code|
|00001b80| 2c 20 66 6d 74 2c 20 70 | 76 61 72 29 3b 0a 20 20 |, fmt, p|var);. |
|00001b90| 20 20 76 61 5f 65 6e 64 | 28 70 76 61 72 29 3b 0a | va_end|(pvar);.|
|00001ba0| 7d 0a 0a 65 72 72 66 20 | 73 65 74 5f 63 6f 6d 5f |}..errf |set_com_|
|00001bb0| 65 72 72 5f 68 6f 6f 6b | 20 28 6e 65 77 5f 70 72 |err_hook| (new_pr|
|00001bc0| 6f 63 29 0a 20 20 20 20 | 65 72 72 66 20 6e 65 77 |oc). |errf new|
|00001bd0| 5f 70 72 6f 63 3b 0a 7b | 0a 20 20 20 20 65 72 72 |_proc;.{|. err|
|00001be0| 66 20 78 20 3d 20 63 6f | 6d 5f 65 72 72 5f 68 6f |f x = co|m_err_ho|
|00001bf0| 6f 6b 3b 0a 0a 20 20 20 | 20 69 66 20 28 6e 65 77 |ok;.. | if (new|
|00001c00| 5f 70 72 6f 63 29 0a 09 | 63 6f 6d 5f 65 72 72 5f |_proc)..|com_err_|
|00001c10| 68 6f 6f 6b 20 3d 20 6e | 65 77 5f 70 72 6f 63 3b |hook = n|ew_proc;|
|00001c20| 0a 20 20 20 20 65 6c 73 | 65 0a 09 63 6f 6d 5f 65 |. els|e..com_e|
|00001c30| 72 72 5f 68 6f 6f 6b 20 | 3d 20 64 65 66 61 75 6c |rr_hook |= defaul|
|00001c40| 74 5f 63 6f 6d 5f 65 72 | 72 5f 70 72 6f 63 3b 0a |t_com_er|r_proc;.|
|00001c50| 0a 20 20 20 20 72 65 74 | 75 72 6e 20 78 3b 0a 7d |. ret|urn x;.}|
|00001c60| 0a 0a 65 72 72 66 20 72 | 65 73 65 74 5f 63 6f 6d |..errf r|eset_com|
|00001c70| 5f 65 72 72 5f 68 6f 6f | 6b 20 28 29 20 7b 0a 20 |_err_hoo|k () {. |
|00001c80| 20 20 20 65 72 72 66 20 | 78 20 3d 20 63 6f 6d 5f | errf |x = com_|
|00001c90| 65 72 72 5f 68 6f 6f 6b | 3b 0a 20 20 20 20 63 6f |err_hook|;. co|
|00001ca0| 6d 5f 65 72 72 5f 68 6f | 6f 6b 20 3d 20 64 65 66 |m_err_ho|ok = def|
|00001cb0| 61 75 6c 74 5f 63 6f 6d | 5f 65 72 72 5f 70 72 6f |ault_com|_err_pro|
|00001cc0| 63 3b 0a 20 20 20 20 72 | 65 74 75 72 6e 20 78 3b |c;. r|eturn x;|
|00001cd0| 0a 7d 0a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e00| 65 32 66 73 70 72 6f 67 | 73 2d 31 2e 30 34 2f 6c |e2fsprog|s-1.04/l|
|00001e10| 69 62 2f 65 74 2f 63 6f | 6d 5f 65 72 72 2e 68 00 |ib/et/co|m_err.h.|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e60| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 33 36 36 |....1006|44 . 366|
|00001e70| 37 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |76 . | 0 . |
|00001e80| 20 20 20 32 32 33 36 20 | 20 35 36 32 35 35 34 30 | 2236 | 5625540|
|00001e90| 33 32 31 20 20 31 34 37 | 34 34 00 20 30 00 00 00 |321 147|44. 0...|
|00001ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f00| 00 75 73 74 61 72 20 20 | 00 74 79 74 73 6f 00 00 |.ustar |.tytso..|
|00001f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f20| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00001f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002000| 2f 2a 0a 20 2a 20 48 65 | 61 64 65 72 20 66 69 6c |/*. * He|ader fil|
|00002010| 65 20 66 6f 72 20 63 6f | 6d 6d 6f 6e 20 65 72 72 |e for co|mmon err|
|00002020| 6f 72 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 6c |or descr|iption l|
|00002030| 69 62 72 61 72 79 2e 0a | 20 2a 0a 20 2a 20 43 6f |ibrary..| *. * Co|
|00002040| 70 79 72 69 67 68 74 20 | 31 39 38 38 2c 20 53 74 |pyright |1988, St|
|00002050| 75 64 65 6e 74 20 49 6e | 66 6f 72 6d 61 74 69 6f |udent In|formatio|
|00002060| 6e 20 50 72 6f 63 65 73 | 73 69 6e 67 20 42 6f 61 |n Proces|sing Boa|
|00002070| 72 64 20 6f 66 20 74 68 | 65 0a 20 2a 20 4d 61 73 |rd of th|e. * Mas|
|00002080| 73 61 63 68 75 73 65 74 | 74 73 20 49 6e 73 74 69 |sachuset|ts Insti|
|00002090| 74 75 74 65 20 6f 66 20 | 54 65 63 68 6e 6f 6c 6f |tute of |Technolo|
|000020a0| 67 79 2e 0a 20 2a 0a 20 | 2a 20 46 6f 72 20 63 6f |gy.. *. |* For co|
|000020b0| 70 79 72 69 67 68 74 20 | 61 6e 64 20 64 69 73 74 |pyright |and dist|
|000020c0| 72 69 62 75 74 69 6f 6e | 20 69 6e 66 6f 2c 20 73 |ribution| info, s|
|000020d0| 65 65 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 61 |ee the d|ocumenta|
|000020e0| 74 69 6f 6e 20 73 75 70 | 70 6c 69 65 64 0a 20 2a |tion sup|plied. *|
|000020f0| 20 77 69 74 68 20 74 68 | 69 73 20 70 61 63 6b 61 | with th|is packa|
|00002100| 67 65 2e 0a 20 2a 2f 0a | 0a 23 69 66 6e 64 65 66 |ge.. */.|.#ifndef|
|00002110| 20 5f 5f 43 4f 4d 5f 45 | 52 52 5f 48 0a 0a 74 79 | __COM_E|RR_H..ty|
|00002120| 70 65 64 65 66 20 6c 6f | 6e 67 20 65 72 72 63 6f |pedef lo|ng errco|
|00002130| 64 65 5f 74 3b 0a 0a 23 | 69 66 64 65 66 20 5f 5f |de_t;..#|ifdef __|
|00002140| 53 54 44 43 5f 5f 0a 23 | 69 6e 63 6c 75 64 65 20 |STDC__.#|include |
|00002150| 3c 73 74 64 61 72 67 2e | 68 3e 0a 0a 2f 2a 20 41 |<stdarg.|h>../* A|
|00002160| 4e 53 49 20 43 20 2d 2d | 20 75 73 65 20 70 72 6f |NSI C --| use pro|
|00002170| 74 6f 74 79 70 65 73 20 | 65 74 63 20 2a 2f 0a 76 |totypes |etc */.v|
|00002180| 6f 69 64 20 63 6f 6d 5f | 65 72 72 20 28 63 6f 6e |oid com_|err (con|
|00002190| 73 74 20 63 68 61 72 20 | 2a 2c 20 6c 6f 6e 67 2c |st char |*, long,|
|000021a0| 20 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 2c 20 2e | const c|har *, .|
|000021b0| 2e 2e 29 3b 0a 76 6f 69 | 64 20 63 6f 6d 5f 65 72 |..);.voi|d com_er|
|000021c0| 72 5f 76 61 20 28 63 6f | 6e 73 74 20 63 68 61 72 |r_va (co|nst char|
|000021d0| 20 2a 77 68 6f 61 6d 69 | 2c 20 65 72 72 63 6f 64 | *whoami|, errcod|
|000021e0| 65 5f 74 20 63 6f 64 65 | 2c 20 63 6f 6e 73 74 20 |e_t code|, const |
|000021f0| 63 68 61 72 20 2a 66 6d | 74 2c 0a 09 09 20 76 61 |char *fm|t,... va|
|00002200| 5f 6c 69 73 74 20 61 72 | 67 73 29 3b 0a 63 68 61 |_list ar|gs);.cha|
|00002210| 72 20 63 6f 6e 73 74 20 | 2a 65 72 72 6f 72 5f 6d |r const |*error_m|
|00002220| 65 73 73 61 67 65 20 28 | 6c 6f 6e 67 29 3b 0a 65 |essage (|long);.e|
|00002230| 78 74 65 72 6e 20 76 6f | 69 64 20 28 2a 63 6f 6d |xtern vo|id (*com|
|00002240| 5f 65 72 72 5f 68 6f 6f | 6b 29 20 28 63 6f 6e 73 |_err_hoo|k) (cons|
|00002250| 74 20 63 68 61 72 20 2a | 2c 20 6c 6f 6e 67 2c 20 |t char *|, long, |
|00002260| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 2c 20 76 61 |const ch|ar *, va|
|00002270| 5f 6c 69 73 74 29 3b 0a | 76 6f 69 64 20 28 2a 73 |_list);.|void (*s|
|00002280| 65 74 5f 63 6f 6d 5f 65 | 72 72 5f 68 6f 6f 6b 20 |et_com_e|rr_hook |
|00002290| 28 76 6f 69 64 20 28 2a | 29 20 28 63 6f 6e 73 74 |(void (*|) (const|
|000022a0| 20 63 68 61 72 20 2a 2c | 20 6c 6f 6e 67 2c 20 63 | char *,| long, c|
|000022b0| 6f 6e 73 74 20 63 68 61 | 72 20 2a 2c 20 76 61 5f |onst cha|r *, va_|
|000022c0| 6c 69 73 74 29 29 29 0a | 20 20 20 20 28 63 6f 6e |list))).| (con|
|000022d0| 73 74 20 63 68 61 72 20 | 2a 2c 20 6c 6f 6e 67 2c |st char |*, long,|
|000022e0| 20 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 2c 20 76 | const c|har *, v|
|000022f0| 61 5f 6c 69 73 74 29 3b | 0a 76 6f 69 64 20 28 2a |a_list);|.void (*|
|00002300| 72 65 73 65 74 5f 63 6f | 6d 5f 65 72 72 5f 68 6f |reset_co|m_err_ho|
|00002310| 6f 6b 20 28 76 6f 69 64 | 29 29 20 28 63 6f 6e 73 |ok (void|)) (cons|
|00002320| 74 20 63 68 61 72 20 2a | 2c 20 6c 6f 6e 67 2c 20 |t char *|, long, |
|00002330| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 2c 20 76 61 |const ch|ar *, va|
|00002340| 5f 6c 69 73 74 29 3b 0a | 69 6e 74 20 69 6e 69 74 |_list);.|int init|
|00002350| 5f 65 72 72 6f 72 5f 74 | 61 62 6c 65 28 63 6f 6e |_error_t|able(con|
|00002360| 73 74 20 63 68 61 72 20 | 2a 20 63 6f 6e 73 74 20 |st char |* const |
|00002370| 2a 6d 73 67 73 2c 20 69 | 6e 74 20 62 61 73 65 2c |*msgs, i|nt base,|
|00002380| 20 69 6e 74 20 63 6f 75 | 6e 74 29 3b 0a 23 65 6c | int cou|nt);.#el|
|00002390| 73 65 0a 2f 2a 20 6e 6f | 20 70 72 6f 74 6f 74 79 |se./* no| prototy|
|000023a0| 70 65 73 20 2a 2f 0a 76 | 6f 69 64 20 63 6f 6d 5f |pes */.v|oid com_|
|000023b0| 65 72 72 20 28 29 3b 0a | 76 6f 69 64 20 63 6f 6d |err ();.|void com|
|000023c0| 5f 65 72 72 5f 76 61 20 | 28 29 3b 0a 63 68 61 72 |_err_va |();.char|
|000023d0| 20 2a 65 72 72 6f 72 5f | 6d 65 73 73 61 67 65 20 | *error_|message |
|000023e0| 28 29 3b 0a 65 78 74 65 | 72 6e 20 76 6f 69 64 20 |();.exte|rn void |
|000023f0| 28 2a 63 6f 6d 5f 65 72 | 72 5f 68 6f 6f 6b 29 20 |(*com_er|r_hook) |
|00002400| 28 29 3b 0a 76 6f 69 64 | 20 28 2a 73 65 74 5f 63 |();.void| (*set_c|
|00002410| 6f 6d 5f 65 72 72 5f 68 | 6f 6f 6b 20 28 29 29 20 |om_err_h|ook ()) |
|00002420| 28 29 3b 0a 76 6f 69 64 | 20 28 2a 72 65 73 65 74 |();.void| (*reset|
|00002430| 5f 63 6f 6d 5f 65 72 72 | 5f 68 6f 6f 6b 20 28 29 |_com_err|_hook ()|
|00002440| 29 20 28 29 3b 0a 69 6e | 74 20 69 6e 69 74 5f 65 |) ();.in|t init_e|
|00002450| 72 72 6f 72 5f 74 61 62 | 6c 65 28 29 3b 0a 23 65 |rror_tab|le();.#e|
|00002460| 6e 64 69 66 0a 0a 23 64 | 65 66 69 6e 65 20 5f 5f |ndif..#d|efine __|
|00002470| 43 4f 4d 5f 45 52 52 5f | 48 0a 23 65 6e 64 69 66 |COM_ERR_|H.#endif|
|00002480| 20 2f 2a 20 21 20 64 65 | 66 69 6e 65 64 28 5f 5f | /* ! de|fined(__|
|00002490| 43 4f 4d 5f 45 52 52 5f | 48 29 20 2a 2f 0a 00 00 |COM_ERR_|H) */...|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 65 32 66 73 70 72 6f 67 | 73 2d 31 2e 30 34 2f 6c |e2fsprog|s-1.04/l|
|00002610| 69 62 2f 65 74 2f 63 6f | 6d 5f 65 72 72 2e 74 65 |ib/et/co|m_err.te|
|00002620| 78 69 6e 66 6f 00 00 00 | 00 00 00 00 00 00 00 00 |xinfo...|........|
|00002630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002660| 00 00 00 00 31 30 30 36 | 34 34 20 00 20 33 36 36 |....1006|44 . 366|
|00002670| 37 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 |76 . | 0 . |
|00002680| 20 20 35 32 35 36 35 20 | 20 35 34 30 33 33 36 37 | 52565 | 5403367|
|00002690| 32 36 32 20 20 31 36 32 | 33 30 00 20 30 00 00 00 |262 162|30. 0...|
|000026a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 75 73 74 61 72 20 20 | 00 74 79 74 73 6f 00 00 |.ustar |.tytso..|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 00 | 00 72 6f 6f 74 00 00 00 |........|.root...|
|00002730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000027f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002800| 5c 69 6e 70 75 74 20 74 | 65 78 69 6e 66 6f 20 40 |\input t|exinfo @|
|00002810| 63 20 2d 2a 2d 74 65 78 | 69 6e 66 6f 2d 2a 2d 0a |c -*-tex|info-*-.|
|00002820| 0a 40 63 20 24 48 65 61 | 64 65 72 3a 20 2f 6d 69 |.@c $Hea|der: /mi|
|00002830| 74 2f 6b 72 62 35 2f 2e | 63 76 73 72 6f 6f 74 2f |t/krb5/.|cvsroot/|
|00002840| 73 72 63 2f 75 74 69 6c | 2f 65 74 2f 63 6f 6d 5f |src/util|/et/com_|
|00002850| 65 72 72 2e 74 65 78 69 | 6e 66 6f 2c 76 20 31 2e |err.texi|nfo,v 1.|
|00002860| 31 20 31 39 39 33 2f 30 | 36 2f 30 33 20 31 32 3a |1 1993/0|6/03 12:|
|00002870| 32 39 3a 33 38 20 74 79 | 74 73 6f 20 45 78 70 20 |29:38 ty|tso Exp |
|00002880| 24 0a 40 63 20 24 53 6f | 75 72 63 65 3a 20 2f 6d |$.@c $So|urce: /m|
|00002890| 69 74 2f 6b 72 62 35 2f | 2e 63 76 73 72 6f 6f 74 |it/krb5/|.cvsroot|
|000028a0| 2f 73 72 63 2f 75 74 69 | 6c 2f 65 74 2f 63 6f 6d |/src/uti|l/et/com|
|000028b0| 5f 65 72 72 2e 74 65 78 | 69 6e 66 6f 2c 76 20 24 |_err.tex|info,v $|
|000028c0| 0a 40 63 20 24 4c 6f 63 | 6b 65 72 3a 20 20 24 0a |.@c $Loc|ker: $.|
|000028d0| 0a 40 63 20 4e 6f 74 65 | 20 74 68 61 74 20 61 6c |.@c Note| that al|
|000028e0| 74 68 6f 75 67 68 20 74 | 68 69 73 20 73 6f 75 72 |though t|his sour|
|000028f0| 63 65 20 66 69 6c 65 20 | 69 73 20 69 6e 20 74 65 |ce file |is in te|
|00002900| 78 69 6e 66 6f 20 66 6f | 72 6d 61 74 20 28 6d 6f |xinfo fo|rmat (mo|
|00002910| 72 65 0a 40 63 20 6f 72 | 20 6c 65 73 73 29 2c 20 |re.@c or| less), |
|00002920| 69 74 20 69 73 20 6e 6f | 74 20 79 65 74 20 73 75 |it is no|t yet su|
|00002930| 69 74 61 62 6c 65 20 66 | 6f 72 20 74 75 72 6e 69 |itable f|or turni|
|00002940| 6e 67 20 69 6e 74 6f 20 | 61 6e 20 60 60 69 6e 66 |ng into |an ``inf|
|00002950| 6f 27 27 0a 40 63 20 66 | 69 6c 65 2e 20 20 53 6f |o''.@c f|ile. So|
|00002960| 72 72 79 2c 20 6d 61 79 | 62 65 20 6e 65 78 74 20 |rry, may|be next |
|00002970| 74 69 6d 65 2e 0a 40 63 | 0a 40 63 20 49 6e 20 6f |time..@c|.@c In o|
|00002980| 72 64 65 72 20 74 6f 20 | 70 72 6f 64 75 63 65 20 |rder to |produce |
|00002990| 68 61 72 64 63 6f 70 79 | 20 64 6f 63 75 6d 65 6e |hardcopy| documen|
|000029a0| 74 61 74 69 6f 6e 20 66 | 72 6f 6d 20 61 20 74 65 |tation f|rom a te|
|000029b0| 78 69 6e 66 6f 20 66 69 | 6c 65 2c 0a 40 63 20 72 |xinfo fi|le,.@c r|
|000029c0| 75 6e 20 60 60 74 65 78 | 20 63 6f 6d 5f 65 72 72 |un ``tex| com_err|
|000029d0| 2e 74 65 78 69 6e 66 6f | 27 27 20 77 68 69 63 68 |.texinfo|'' which|
|000029e0| 20 77 69 6c 6c 20 6c 6f | 61 64 20 69 6e 20 74 65 | will lo|ad in te|
|000029f0| 78 69 6e 66 6f 2e 74 65 | 78 2c 0a 40 63 20 70 72 |xinfo.te|x,.@c pr|
|00002a00| 6f 76 69 64 65 64 20 69 | 6e 20 74 68 69 73 20 64 |ovided i|n this d|
|00002a10| 69 73 74 72 69 62 75 74 | 69 6f 6e 2e 20 20 28 74 |istribut|ion. (t|
|00002a20| 65 78 69 6e 66 6f 2e 74 | 65 78 20 69 73 20 66 72 |exinfo.t|ex is fr|
|00002a30| 6f 6d 20 74 68 65 20 46 | 72 65 65 0a 40 63 20 53 |om the F|ree.@c S|
|00002a40| 6f 66 74 77 61 72 65 20 | 46 6f 75 6e 64 61 74 69 |oftware |Foundati|
|00002a50| 6f 6e 2c 20 61 6e 64 20 | 69 73 20 75 6e 64 65 72 |on, and |is under|
|00002a60| 20 64 69 66 66 65 72 65 | 6e 74 20 63 6f 70 79 72 | differe|nt copyr|
|00002a70| 69 67 68 74 20 72 65 73 | 74 72 69 63 74 69 6f 6e |ight res|triction|
|00002a80| 73 0a 40 63 20 66 72 6f | 6d 20 74 68 65 20 72 65 |s.@c fro|m the re|
|00002a90| 73 74 20 6f 66 20 74 68 | 69 73 20 70 61 63 6b 61 |st of th|is packa|
|00002aa0| 67 65 2e 29 0a 0a 40 69 | 66 69 6e 66 6f 0a 40 62 |ge.)..@i|finfo.@b|
|00002ab0| 61 72 66 6f 0a 40 65 6e | 64 20 69 66 69 6e 66 6f |arfo.@en|d ifinfo|
|00002ac0| 0a 0a 40 69 66 74 65 78 | 0a 40 74 6f 6c 65 72 61 |..@iftex|.@tolera|
|00002ad0| 6e 63 65 20 31 30 30 30 | 30 0a 0a 40 63 20 4d 75 |nce 1000|0..@c Mu|
|00002ae0| 74 61 74 65 20 73 65 63 | 74 69 6f 6e 20 68 65 61 |tate sec|tion hea|
|00002af0| 64 65 72 73 2e 2e 2e 0a | 40 62 65 67 69 6e 67 72 |ders....|@begingr|
|00002b00| 6f 75 70 0a 20 20 40 63 | 61 74 63 6f 64 65 11 23 |oup. @c|atcode.#|
|00002b10| 3d 36 0a 20 20 40 67 64 | 65 66 40 73 65 63 68 65 |=6. @gd|ef@seche|
|00002b20| 61 64 69 6e 67 23 31 23 | 32 23 33 7b 40 73 65 63 |ading#1#|2#3{@sec|
|00002b30| 68 65 61 64 69 6e 67 69 | 20 7b 23 33 40 65 6e 73 |headingi| {#3@ens|
|00002b40| 70 61 63 65 20 23 31 7d | 7d 0a 40 65 6e 64 67 72 |pace #1}|}.@endgr|
|00002b50| 6f 75 70 0a 40 65 6e 64 | 20 69 66 74 65 78 0a 0a |oup.@end| iftex..|
|00002b60| 40 73 65 74 66 69 6c 65 | 6e 61 6d 65 20 63 6f 6d |@setfile|name com|
|00002b70| 5f 65 72 72 0a 40 73 65 | 74 74 69 74 6c 65 20 41 |_err.@se|ttitle A|
|00002b80| 20 43 6f 6d 6d 6f 6e 20 | 45 72 72 6f 72 20 44 65 | Common |Error De|
|00002b90| 73 63 72 69 70 74 69 6f | 6e 20 4c 69 62 72 61 72 |scriptio|n Librar|
|00002ba0| 79 20 66 6f 72 20 55 4e | 49 58 0a 0a 40 69 66 69 |y for UN|IX..@ifi|
|00002bb0| 6e 66 6f 0a 54 68 69 73 | 20 66 69 6c 65 20 64 6f |nfo.This| file do|
|00002bc0| 63 75 6d 65 6e 74 73 20 | 74 68 65 20 75 73 65 20 |cuments |the use |
|00002bd0| 6f 66 20 74 68 65 20 43 | 6f 6d 6d 6f 6e 20 45 72 |of the C|ommon Er|
|00002be0| 72 6f 72 20 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ror Desc|ription |
|00002bf0| 6c 69 62 72 61 72 79 2e | 0a 0a 43 6f 70 79 72 69 |library.|..Copyri|
|00002c00| 67 68 74 20 28 43 29 20 | 31 39 38 37 2c 20 31 39 |ght (C) |1987, 19|
|00002c10| 38 38 20 53 74 75 64 65 | 6e 74 20 49 6e 66 6f 72 |88 Stude|nt Infor|
|00002c20| 6d 61 74 69 6f 6e 20 50 | 72 6f 63 65 73 73 69 6e |mation P|rocessin|
|00002c30| 67 20 42 6f 61 72 64 20 | 6f 66 20 74 68 65 0a 4d |g Board |of the.M|
|00002c40| 61 73 73 61 63 68 75 73 | 65 74 74 73 20 49 6e 73 |assachus|etts Ins|
|00002c50| 74 69 74 75 74 65 20 6f | 66 20 54 65 63 68 6e 6f |titute o|f Techno|
|00002c60| 6c 6f 67 79 2e 0a 0a 50 | 65 72 6d 69 73 73 69 6f |logy...P|ermissio|
|00002c70| 6e 20 74 6f 20 75 73 65 | 2c 20 63 6f 70 79 2c 20 |n to use|, copy, |
|00002c80| 6d 6f 64 69 66 79 2c 20 | 61 6e 64 20 64 69 73 74 |modify, |and dist|
|00002c90| 72 69 62 75 74 65 20 74 | 68 69 73 20 73 6f 66 74 |ribute t|his soft|
|00002ca0| 77 61 72 65 20 61 6e 64 | 20 69 74 73 0a 64 6f 63 |ware and| its.doc|
|00002cb0| 75 6d 65 6e 74 61 74 69 | 6f 6e 20 66 6f 72 20 61 |umentati|on for a|
|00002cc0| 6e 79 20 70 75 72 70 6f | 73 65 20 61 6e 64 20 77 |ny purpo|se and w|
|00002cd0| 69 74 68 6f 75 74 20 66 | 65 65 20 69 73 20 68 65 |ithout f|ee is he|
|00002ce0| 72 65 62 79 20 67 72 61 | 6e 74 65 64 2c 20 70 72 |reby gra|nted, pr|
|00002cf0| 6f 76 69 64 65 64 0a 74 | 68 61 74 20 74 68 65 20 |ovided.t|hat the |
|00002d00| 61 62 6f 76 65 20 63 6f | 70 79 72 69 67 68 74 20 |above co|pyright |
|00002d10| 6e 6f 74 69 63 65 20 61 | 70 70 65 61 72 20 69 6e |notice a|ppear in|
|00002d20| 20 61 6c 6c 20 63 6f 70 | 69 65 73 20 61 6e 64 20 | all cop|ies and |
|00002d30| 74 68 61 74 20 62 6f 74 | 68 20 74 68 61 74 0a 63 |that bot|h that.c|
|00002d40| 6f 70 79 72 69 67 68 74 | 20 6e 6f 74 69 63 65 20 |opyright| notice |
|00002d50| 61 6e 64 20 74 68 69 73 | 20 70 65 72 6d 69 73 73 |and this| permiss|
|00002d60| 69 6f 6e 20 6e 6f 74 69 | 63 65 20 61 70 70 65 61 |ion noti|ce appea|
|00002d70| 72 20 69 6e 20 73 75 70 | 70 6f 72 74 69 6e 67 0a |r in sup|porting.|
|00002d80| 64 6f 63 75 6d 65 6e 74 | 61 74 69 6f 6e 2c 20 61 |document|ation, a|
|00002d90| 6e 64 20 74 68 61 74 20 | 74 68 65 20 6e 61 6d 65 |nd that |the name|
|00002da0| 73 20 6f 66 20 4d 2e 49 | 2e 54 2e 20 61 6e 64 20 |s of M.I|.T. and |
|00002db0| 74 68 65 20 4d 2e 49 2e | 54 2e 20 53 2e 49 2e 50 |the M.I.|T. S.I.P|
|00002dc0| 2e 42 2e 20 6e 6f 74 20 | 62 65 0a 75 73 65 64 20 |.B. not |be.used |
|00002dd0| 69 6e 20 61 64 76 65 72 | 74 69 73 69 6e 67 20 6f |in adver|tising o|
|00002de0| 72 20 70 75 62 6c 69 63 | 69 74 79 20 70 65 72 74 |r public|ity pert|
|00002df0| 61 69 6e 69 6e 67 20 74 | 6f 20 64 69 73 74 72 69 |aining t|o distri|
|00002e00| 62 75 74 69 6f 6e 20 6f | 66 20 74 68 65 20 73 6f |bution o|f the so|
|00002e10| 66 74 77 61 72 65 0a 77 | 69 74 68 6f 75 74 20 73 |ftware.w|ithout s|
|00002e20| 70 65 63 69 66 69 63 2c | 20 77 72 69 74 74 65 6e |pecific,| written|
|00002e30| 20 70 72 69 6f 72 20 70 | 65 72 6d 69 73 73 69 6f | prior p|ermissio|
|00002e40| 6e 2e 20 20 4d 2e 49 2e | 54 2e 20 61 6e 64 20 74 |n. M.I.|T. and t|
|00002e50| 68 65 20 4d 2e 49 2e 54 | 2e 20 53 2e 49 2e 50 2e |he M.I.T|. S.I.P.|
|00002e60| 42 2e 0a 6d 61 6b 65 20 | 6e 6f 20 72 65 70 72 65 |B..make |no repre|
|00002e70| 73 65 6e 74 61 74 69 6f | 6e 73 20 61 62 6f 75 74 |sentatio|ns about|
|00002e80| 20 74 68 65 20 73 75 69 | 74 61 62 69 6c 69 74 79 | the sui|tability|
|00002e90| 20 6f 66 20 74 68 69 73 | 20 73 6f 66 74 77 61 72 | of this| softwar|
|00002ea0| 65 20 66 6f 72 20 61 6e | 79 0a 70 75 72 70 6f 73 |e for an|y.purpos|
|00002eb0| 65 2e 20 20 49 74 20 69 | 73 20 70 72 6f 76 69 64 |e. It i|s provid|
|00002ec0| 65 64 20 22 61 73 20 69 | 73 22 20 77 69 74 68 6f |ed "as i|s" witho|
|00002ed0| 75 74 20 65 78 70 72 65 | 73 73 20 6f 72 20 69 6d |ut expre|ss or im|
|00002ee0| 70 6c 69 65 64 20 77 61 | 72 72 61 6e 74 79 2e 0a |plied wa|rranty..|
|00002ef0| 0a 4e 6f 74 65 20 74 68 | 61 74 20 74 68 65 20 66 |.Note th|at the f|
|00002f00| 69 6c 65 20 74 65 78 69 | 6e 66 6f 2e 74 65 78 2c |ile texi|nfo.tex,|
|00002f10| 20 70 72 6f 76 69 64 65 | 64 20 77 69 74 68 20 74 | provide|d with t|
|00002f20| 68 69 73 20 64 69 73 74 | 72 69 62 75 74 69 6f 6e |his dist|ribution|
|00002f30| 2c 20 69 73 20 66 72 6f | 6d 0a 74 68 65 20 46 72 |, is fro|m.the Fr|
|00002f40| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00002f50| 64 61 74 69 6f 6e 2c 20 | 61 6e 64 20 69 73 20 75 |dation, |and is u|
|00002f60| 6e 64 65 72 20 64 69 66 | 66 65 72 65 6e 74 20 63 |nder dif|ferent c|
|00002f70| 6f 70 79 72 69 67 68 74 | 20 72 65 73 74 72 69 63 |opyright| restric|
|00002f80| 74 69 6f 6e 73 0a 66 72 | 6f 6d 20 74 68 65 20 72 |tions.fr|om the r|
|00002f90| 65 6d 61 69 6e 64 65 72 | 20 6f 66 20 74 68 69 73 |emainder| of this|
|00002fa0| 20 70 61 63 6b 61 67 65 | 2e 0a 0a 40 65 6e 64 20 | package|...@end |
|00002fb0| 69 66 69 6e 66 6f 0a 0a | 40 69 67 6e 6f 72 65 0a |ifinfo..|@ignore.|
|00002fc0| 50 65 72 6d 69 73 73 69 | 6f 6e 20 69 73 20 67 72 |Permissi|on is gr|
|00002fd0| 61 6e 74 65 64 20 74 6f | 20 70 72 6f 63 65 73 73 |anted to| process|
|00002fe0| 20 74 68 69 73 20 66 69 | 6c 65 20 74 68 72 6f 75 | this fi|le throu|
|00002ff0| 67 68 20 54 65 78 20 61 | 6e 64 20 70 72 69 6e 74 |gh Tex a|nd print|
|00003000| 20 74 68 65 0a 72 65 73 | 75 6c 74 73 2c 20 70 72 | the.res|ults, pr|
|00003010| 6f 76 69 64 65 64 20 74 | 68 65 20 70 72 69 6e 74 |ovided t|he print|
|00003020| 65 64 20 64 6f 63 75 6d | 65 6e 74 20 63 61 72 72 |ed docum|ent carr|
|00003030| 69 65 73 20 63 6f 70 79 | 69 6e 67 20 70 65 72 6d |ies copy|ing perm|
|00003040| 69 73 73 69 6f 6e 0a 6e | 6f 74 69 63 65 20 69 64 |ission.n|otice id|
|00003050| 65 6e 74 69 63 61 6c 20 | 74 6f 20 74 68 69 73 20 |entical |to this |
|00003060| 6f 6e 65 20 65 78 63 65 | 70 74 20 66 6f 72 20 74 |one exce|pt for t|
|00003070| 68 65 20 72 65 6d 6f 76 | 61 6c 20 6f 66 20 74 68 |he remov|al of th|
|00003080| 69 73 20 70 61 72 61 67 | 72 61 70 68 0a 28 74 68 |is parag|raph.(th|
|00003090| 69 73 20 70 61 72 61 67 | 72 61 70 68 20 6e 6f 74 |is parag|raph not|
|000030a0| 20 62 65 69 6e 67 20 72 | 65 6c 65 76 61 6e 74 20 | being r|elevant |
|000030b0| 74 6f 20 74 68 65 20 70 | 72 69 6e 74 65 64 20 6d |to the p|rinted m|
|000030c0| 61 6e 75 61 6c 29 2e 0a | 0a 40 65 6e 64 20 69 67 |anual)..|.@end ig|
|000030d0| 6e 6f 72 65 0a 0a 40 73 | 65 74 63 68 61 70 74 65 |nore..@s|etchapte|
|000030e0| 72 6e 65 77 70 61 67 65 | 20 6f 64 64 0a 0a 40 74 |rnewpage| odd..@t|
|000030f0| 69 74 6c 65 70 61 67 65 | 0a 40 63 65 6e 74 65 72 |itlepage|.@center|
|00003100| 20 40 74 69 74 6c 65 66 | 6f 6e 74 7b 41 20 43 6f | @titlef|ont{A Co|
|00003110| 6d 6d 6f 6e 20 45 72 72 | 6f 72 20 44 65 73 63 72 |mmon Err|or Descr|
|00003120| 69 70 74 69 6f 6e 7d 0a | 40 63 65 6e 74 65 72 20 |iption}.|@center |
|00003130| 40 74 69 74 6c 65 66 6f | 6e 74 7b 4c 69 62 72 61 |@titlefo|nt{Libra|
|00003140| 72 79 20 66 6f 72 20 55 | 4e 49 58 7d 0a 40 73 70 |ry for U|NIX}.@sp|
|00003150| 20 32 0a 40 63 65 6e 74 | 65 72 20 4b 65 6e 20 52 | 2.@cent|er Ken R|
|00003160| 61 65 62 75 72 6e 0a 40 | 63 65 6e 74 65 72 20 42 |aeburn.@|center B|
|00003170| 69 6c 6c 20 53 6f 6d 6d | 65 72 66 65 6c 64 0a 40 |ill Somm|erfeld.@|
|00003180| 73 70 20 31 0a 40 63 65 | 6e 74 65 72 20 4d 49 54 |sp 1.@ce|nter MIT|
|00003190| 20 53 74 75 64 65 6e 74 | 20 49 6e 66 6f 72 6d 61 | Student| Informa|
|000031a0| 74 69 6f 6e 20 50 72 6f | 63 65 73 73 69 6e 67 20 |tion Pro|cessing |
|000031b0| 42 6f 61 72 64 0a 40 73 | 70 20 33 0a 40 63 65 6e |Board.@s|p 3.@cen|
|000031c0| 74 65 72 20 6c 61 73 74 | 20 75 70 64 61 74 65 64 |ter last| updated|
|000031d0| 20 31 20 4a 61 6e 75 61 | 72 79 20 31 39 38 39 0a | 1 Janua|ry 1989.|
|000031e0| 40 63 65 6e 74 65 72 20 | 66 6f 72 20 76 65 72 73 |@center |for vers|
|000031f0| 69 6f 6e 20 31 2e 32 0a | 40 63 65 6e 74 65 72 20 |ion 1.2.|@center |
|00003200| 2a 2a 2a 44 52 41 46 54 | 20 43 4f 50 59 20 4f 4e |***DRAFT| COPY ON|
|00003210| 4c 59 2a 2a 2a 0a 0a 40 | 76 73 6b 69 70 20 32 69 |LY***..@|vskip 2i|
|00003220| 6e 0a 0a 40 63 65 6e 74 | 65 72 20 40 62 7b 41 62 |n..@cent|er @b{Ab|
|00003230| 73 74 72 61 63 74 7d 0a | 0a 55 4e 49 58 20 68 61 |stract}.|.UNIX ha|
|00003240| 73 20 61 6c 77 61 79 73 | 20 68 61 64 20 61 20 63 |s always| had a c|
|00003250| 6c 65 61 6e 20 61 6e 64 | 20 73 69 6d 70 6c 65 20 |lean and| simple |
|00003260| 73 79 73 74 65 6d 20 63 | 61 6c 6c 20 69 6e 74 65 |system c|all inte|
|00003270| 72 66 61 63 65 2c 20 77 | 69 74 68 20 61 0a 73 74 |rface, w|ith a.st|
|00003280| 61 6e 64 61 72 64 20 73 | 65 74 20 6f 66 20 65 72 |andard s|et of er|
|00003290| 72 6f 72 20 63 6f 64 65 | 73 20 70 61 73 73 65 64 |ror code|s passed|
|000032a0| 20 62 65 74 77 65 65 6e | 20 74 68 65 20 6b 65 72 | between| the ker|
|000032b0| 6e 65 6c 20 61 6e 64 20 | 75 73 65 72 0a 70 72 6f |nel and |user.pro|
|000032c0| 67 72 61 6d 73 2e 20 20 | 55 6e 66 6f 72 74 75 6e |grams. |Unfortun|
|000032d0| 61 74 65 6c 79 2c 20 74 | 68 65 20 73 61 6d 65 20 |ately, t|he same |
|000032e0| 63 61 6e 6e 6f 74 20 62 | 65 20 73 61 69 64 20 6f |cannot b|e said o|
|000032f0| 66 20 6d 61 6e 79 20 6f | 66 20 74 68 65 0a 6c 69 |f many o|f the.li|
|00003300| 62 72 61 72 69 65 73 20 | 6c 61 79 65 72 65 64 20 |braries |layered |
|00003310| 6f 6e 20 74 6f 70 20 6f | 66 20 74 68 65 20 70 72 |on top o|f the pr|
|00003320| 69 6d 69 74 69 76 65 73 | 20 70 72 6f 76 69 64 65 |imitives| provide|
|00003330| 64 20 62 79 20 74 68 65 | 20 6b 65 72 6e 65 6c 2e |d by the| kernel.|
|00003340| 0a 54 79 70 69 63 61 6c | 6c 79 2c 20 65 61 63 68 |.Typical|ly, each|
|00003350| 20 6f 6e 65 20 68 61 73 | 20 75 73 65 64 20 61 20 | one has| used a |
|00003360| 64 69 66 66 65 72 65 6e | 74 20 73 74 79 6c 65 20 |differen|t style |
|00003370| 6f 66 20 69 6e 64 69 63 | 61 74 69 6e 67 20 65 72 |of indic|ating er|
|00003380| 72 6f 72 73 20 74 6f 0a | 74 68 65 69 72 20 63 61 |rors to.|their ca|
|00003390| 6c 6c 65 72 73 2c 20 6c | 65 61 64 69 6e 67 20 74 |llers, l|eading t|
|000033a0| 6f 20 61 20 74 6f 74 61 | 6c 20 68 6f 64 67 65 70 |o a tota|l hodgep|
|000033b0| 6f 64 67 65 20 6f 66 20 | 65 72 72 6f 72 20 68 61 |odge of |error ha|
|000033c0| 6e 64 6c 69 6e 67 2c 20 | 61 6e 64 0a 63 6f 6e 73 |ndling, |and.cons|
|000033d0| 69 64 65 72 61 62 6c 65 | 20 61 6d 6f 75 6e 74 73 |iderable| amounts|
|000033e0| 20 6f 66 20 77 6f 72 6b | 20 66 6f 72 20 74 68 65 | of work| for the|
|000033f0| 20 70 72 6f 67 72 61 6d | 6d 65 72 2e 20 20 54 68 | program|mer. Th|
|00003400| 69 73 20 70 61 70 65 72 | 20 64 65 73 63 72 69 62 |is paper| describ|
|00003410| 65 73 0a 61 20 6c 69 62 | 72 61 72 79 20 61 6e 64 |es.a lib|rary and|
|00003420| 20 61 73 73 6f 63 69 61 | 74 65 64 20 75 74 69 6c | associa|ted util|
|00003430| 69 74 69 65 73 20 77 68 | 69 63 68 20 61 6c 6c 6f |ities wh|ich allo|
|00003440| 77 73 20 61 20 6d 6f 72 | 65 20 75 6e 69 66 6f 72 |ws a mor|e unifor|
|00003450| 6d 20 77 61 79 20 66 6f | 72 0a 6c 69 62 72 61 72 |m way fo|r.librar|
|00003460| 69 65 73 20 74 6f 20 72 | 65 74 75 72 6e 20 65 72 |ies to r|eturn er|
|00003470| 72 6f 72 73 20 74 6f 20 | 74 68 65 69 72 20 63 61 |rors to |their ca|
|00003480| 6c 6c 65 72 73 2c 20 61 | 6e 64 20 66 6f 72 20 70 |llers, a|nd for p|
|00003490| 72 6f 67 72 61 6d 73 20 | 74 6f 0a 64 65 73 63 72 |rograms |to.descr|
|000034a0| 69 62 65 20 65 72 72 6f | 72 73 20 61 6e 64 20 65 |ibe erro|rs and e|
|000034b0| 78 63 65 70 74 69 6f 6e | 61 6c 20 63 6f 6e 64 69 |xception|al condi|
|000034c0| 74 69 6f 6e 73 20 74 6f | 20 74 68 65 69 72 20 75 |tions to| their u|
|000034d0| 73 65 72 73 2e 0a 0a 40 | 70 61 67 65 0a 40 76 73 |sers...@|page.@vs|
|000034e0| 6b 69 70 20 30 70 74 20 | 70 6c 75 73 20 31 66 69 |kip 0pt |plus 1fi|
|000034f0| 6c 6c 6c 0a 0a 43 6f 70 | 79 72 69 67 68 74 20 40 |lll..Cop|yright @|
|00003500| 63 6f 70 79 72 69 67 68 | 74 7b 7d 20 31 39 38 37 |copyrigh|t{} 1987|
|00003510| 2c 20 31 39 38 38 20 62 | 79 20 74 68 65 20 53 74 |, 1988 b|y the St|
|00003520| 75 64 65 6e 74 20 49 6e | 66 6f 72 6d 61 74 69 6f |udent In|formatio|
|00003530| 6e 20 50 72 6f 63 65 73 | 73 69 6e 67 0a 42 6f 61 |n Proces|sing.Boa|
|00003540| 72 64 20 6f 66 20 74 68 | 65 20 4d 61 73 73 61 63 |rd of th|e Massac|
|00003550| 68 75 73 65 74 74 73 20 | 49 6e 73 74 69 74 75 74 |husetts |Institut|
|00003560| 65 20 6f 66 20 54 65 63 | 68 6e 6f 6c 6f 67 79 2e |e of Tec|hnology.|
|00003570| 0a 0a 50 65 72 6d 69 73 | 73 69 6f 6e 20 74 6f 20 |..Permis|sion to |
|00003580| 75 73 65 2c 20 63 6f 70 | 79 2c 20 6d 6f 64 69 66 |use, cop|y, modif|
|00003590| 79 2c 20 61 6e 64 20 64 | 69 73 74 72 69 62 75 74 |y, and d|istribut|
|000035a0| 65 20 74 68 69 73 20 73 | 6f 66 74 77 61 72 65 20 |e this s|oftware |
|000035b0| 61 6e 64 20 69 74 73 0a | 64 6f 63 75 6d 65 6e 74 |and its.|document|
|000035c0| 61 74 69 6f 6e 20 66 6f | 72 20 61 6e 79 20 70 75 |ation fo|r any pu|
|000035d0| 72 70 6f 73 65 20 61 6e | 64 20 77 69 74 68 6f 75 |rpose an|d withou|
|000035e0| 74 20 66 65 65 20 69 73 | 20 68 65 72 65 62 79 20 |t fee is| hereby |
|000035f0| 67 72 61 6e 74 65 64 2c | 20 70 72 6f 76 69 64 65 |granted,| provide|
|00003600| 64 0a 74 68 61 74 20 74 | 68 65 20 61 62 6f 76 65 |d.that t|he above|
|00003610| 20 63 6f 70 79 72 69 67 | 68 74 20 6e 6f 74 69 63 | copyrig|ht notic|
|00003620| 65 20 61 70 70 65 61 72 | 20 69 6e 20 61 6c 6c 20 |e appear| in all |
|00003630| 63 6f 70 69 65 73 20 61 | 6e 64 20 74 68 61 74 20 |copies a|nd that |
|00003640| 62 6f 74 68 20 74 68 61 | 74 0a 63 6f 70 79 72 69 |both tha|t.copyri|
|00003650| 67 68 74 20 6e 6f 74 69 | 63 65 20 61 6e 64 20 74 |ght noti|ce and t|
|00003660| 68 69 73 20 70 65 72 6d | 69 73 73 69 6f 6e 20 6e |his perm|ission n|
|00003670| 6f 74 69 63 65 20 61 70 | 70 65 61 72 20 69 6e 20 |otice ap|pear in |
|00003680| 73 75 70 70 6f 72 74 69 | 6e 67 0a 64 6f 63 75 6d |supporti|ng.docum|
|00003690| 65 6e 74 61 74 69 6f 6e | 2c 20 61 6e 64 20 74 68 |entation|, and th|
|000036a0| 61 74 20 74 68 65 20 6e | 61 6d 65 73 20 6f 66 20 |at the n|ames of |
|000036b0| 4d 2e 49 2e 54 2e 20 61 | 6e 64 20 74 68 65 20 4d |M.I.T. a|nd the M|
|000036c0| 2e 49 2e 54 2e 20 53 2e | 49 2e 50 2e 42 2e 20 6e |.I.T. S.|I.P.B. n|
|000036d0| 6f 74 20 62 65 0a 75 73 | 65 64 20 69 6e 20 61 64 |ot be.us|ed in ad|
|000036e0| 76 65 72 74 69 73 69 6e | 67 20 6f 72 20 70 75 62 |vertisin|g or pub|
|000036f0| 6c 69 63 69 74 79 20 70 | 65 72 74 61 69 6e 69 6e |licity p|ertainin|
|00003700| 67 20 74 6f 20 64 69 73 | 74 72 69 62 75 74 69 6f |g to dis|tributio|
|00003710| 6e 20 6f 66 20 74 68 65 | 20 73 6f 66 74 77 61 72 |n of the| softwar|
|00003720| 65 0a 77 69 74 68 6f 75 | 74 20 73 70 65 63 69 66 |e.withou|t specif|
|00003730| 69 63 2c 20 77 72 69 74 | 74 65 6e 20 70 72 69 6f |ic, writ|ten prio|
|00003740| 72 20 70 65 72 6d 69 73 | 73 69 6f 6e 2e 20 20 4d |r permis|sion. M|
|00003750| 2e 49 2e 54 2e 20 61 6e | 64 20 74 68 65 20 4d 2e |.I.T. an|d the M.|
|00003760| 49 2e 54 2e 20 53 2e 49 | 2e 50 2e 42 2e 0a 6d 61 |I.T. S.I|.P.B..ma|
|00003770| 6b 65 20 6e 6f 20 72 65 | 70 72 65 73 65 6e 74 61 |ke no re|presenta|
|00003780| 74 69 6f 6e 73 20 61 62 | 6f 75 74 20 74 68 65 20 |tions ab|out the |
|00003790| 73 75 69 74 61 62 69 6c | 69 74 79 20 6f 66 20 74 |suitabil|ity of t|
|000037a0| 68 69 73 20 73 6f 66 74 | 77 61 72 65 20 66 6f 72 |his soft|ware for|
|000037b0| 20 61 6e 79 0a 70 75 72 | 70 6f 73 65 2e 20 20 49 | any.pur|pose. I|
|000037c0| 74 20 69 73 20 70 72 6f | 76 69 64 65 64 20 22 61 |t is pro|vided "a|
|000037d0| 73 20 69 73 22 20 77 69 | 74 68 6f 75 74 20 65 78 |s is" wi|thout ex|
|000037e0| 70 72 65 73 73 20 6f 72 | 20 69 6d 70 6c 69 65 64 |press or| implied|
|000037f0| 20 77 61 72 72 61 6e 74 | 79 2e 0a 0a 4e 6f 74 65 | warrant|y...Note|
|00003800| 20 74 68 61 74 20 74 68 | 65 20 66 69 6c 65 20 74 | that th|e file t|
|00003810| 65 78 69 6e 66 6f 2e 74 | 65 78 2c 20 70 72 6f 76 |exinfo.t|ex, prov|
|00003820| 69 64 65 64 20 77 69 74 | 68 20 74 68 69 73 20 64 |ided wit|h this d|
|00003830| 69 73 74 72 69 62 75 74 | 69 6f 6e 2c 20 69 73 20 |istribut|ion, is |
|00003840| 66 72 6f 6d 0a 74 68 65 | 20 46 72 65 65 20 53 6f |from.the| Free So|
|00003850| 66 74 77 61 72 65 20 46 | 6f 75 6e 64 61 74 69 6f |ftware F|oundatio|
|00003860| 6e 2c 20 61 6e 64 20 69 | 73 20 75 6e 64 65 72 20 |n, and i|s under |
|00003870| 64 69 66 66 65 72 65 6e | 74 20 63 6f 70 79 72 69 |differen|t copyri|
|00003880| 67 68 74 20 72 65 73 74 | 72 69 63 74 69 6f 6e 73 |ght rest|rictions|
|00003890| 0a 66 72 6f 6d 20 74 68 | 65 20 72 65 6d 61 69 6e |.from th|e remain|
|000038a0| 64 65 72 20 6f 66 20 74 | 68 69 73 20 70 61 63 6b |der of t|his pack|
|000038b0| 61 67 65 2e 0a 0a 40 65 | 6e 64 20 74 69 74 6c 65 |age...@e|nd title|
|000038c0| 70 61 67 65 0a 0a 40 69 | 66 69 6e 66 6f 0a 40 63 |page..@i|finfo.@c|
|000038d0| 20 73 68 6f 75 6c 64 20 | 70 75 74 20 61 20 6d 65 | should |put a me|
|000038e0| 6e 75 20 68 65 72 65 20 | 73 6f 6d 65 64 61 79 2e |nu here |someday.|
|000038f0| 2e 2e 2e 0a 40 65 6e 64 | 20 69 66 69 6e 66 6f 0a |....@end| ifinfo.|
|00003900| 0a 40 70 61 67 65 0a 0a | 40 73 65 63 74 69 6f 6e |.@page..|@section|
|00003910| 20 57 68 79 20 63 6f 6d | 5f 65 72 72 3f 0a 0a 49 | Why com|_err?..I|
|00003920| 6e 20 62 75 69 6c 64 69 | 6e 67 20 61 70 70 6c 69 |n buildi|ng appli|
|00003930| 63 61 74 69 6f 6e 20 73 | 6f 66 74 77 61 72 65 20 |cation s|oftware |
|00003940| 70 61 63 6b 61 67 65 73 | 2c 20 61 20 70 72 6f 67 |packages|, a prog|
|00003950| 72 61 6d 6d 65 72 20 6f | 66 74 65 6e 20 68 61 73 |rammer o|ften has|
|00003960| 20 74 6f 0a 64 65 61 6c | 20 77 69 74 68 20 61 20 | to.deal| with a |
|00003970| 6e 75 6d 62 65 72 20 6f | 66 20 6c 69 62 72 61 72 |number o|f librar|
|00003980| 69 65 73 2c 20 65 61 63 | 68 20 6f 66 20 77 68 69 |ies, eac|h of whi|
|00003990| 63 68 20 63 61 6e 20 75 | 73 65 20 61 20 64 69 66 |ch can u|se a dif|
|000039a0| 66 65 72 65 6e 74 0a 65 | 72 72 6f 72 2d 72 65 70 |ferent.e|rror-rep|
|000039b0| 6f 72 74 69 6e 67 20 6d | 65 63 68 61 6e 69 73 6d |orting m|echanism|
|000039c0| 2e 20 20 53 6f 6d 65 74 | 69 6d 65 73 20 6f 6e 65 |. Somet|imes one|
|000039d0| 20 6f 66 20 74 77 6f 20 | 76 61 6c 75 65 73 20 69 | of two |values i|
|000039e0| 73 20 72 65 74 75 72 6e | 65 64 2c 0a 69 6e 64 69 |s return|ed,.indi|
|000039f0| 63 61 74 69 6e 67 20 73 | 69 6d 70 6c 79 20 53 55 |cating s|imply SU|
|00003a00| 43 43 45 53 53 20 6f 72 | 20 46 41 49 4c 55 52 45 |CCESS or| FAILURE|
|00003a10| 2c 20 77 69 74 68 20 6e | 6f 20 64 65 73 63 72 69 |, with n|o descri|
|00003a20| 70 74 69 6f 6e 20 6f 66 | 20 65 72 72 6f 72 73 0a |ption of| errors.|
|00003a30| 65 6e 63 6f 75 6e 74 65 | 72 65 64 2e 20 20 53 6f |encounte|red. So|
|00003a40| 6d 65 74 69 6d 65 73 20 | 69 74 20 69 73 20 61 6e |metimes |it is an|
|00003a50| 20 69 6e 64 65 78 20 69 | 6e 74 6f 20 61 20 74 61 | index i|nto a ta|
|00003a60| 62 6c 65 20 6f 66 20 74 | 65 78 74 20 73 74 72 69 |ble of t|ext stri|
|00003a70| 6e 67 73 2c 0a 77 68 65 | 72 65 20 74 68 65 20 6e |ngs,.whe|re the n|
|00003a80| 61 6d 65 20 6f 66 20 74 | 68 65 20 74 61 62 6c 65 |ame of t|he table|
|00003a90| 20 75 73 65 64 20 69 73 | 20 64 65 70 65 6e 64 65 | used is| depende|
|00003aa0| 6e 74 20 6f 6e 20 74 68 | 65 20 6c 69 62 72 61 72 |nt on th|e librar|
|00003ab0| 79 20 62 65 69 6e 67 0a | 75 73 65 64 20 77 68 65 |y being.|used whe|
|00003ac0| 6e 20 74 68 65 20 65 72 | 72 6f 72 20 69 73 20 67 |n the er|ror is g|
|00003ad0| 65 6e 65 72 61 74 65 64 | 3b 20 73 69 6e 63 65 20 |enerated|; since |
|00003ae0| 65 61 63 68 20 74 61 62 | 6c 65 20 73 74 61 72 74 |each tab|le start|
|00003af0| 73 20 6e 75 6d 62 65 72 | 69 6e 67 20 61 74 0a 30 |s number|ing at.0|
|00003b00| 20 6f 72 20 31 2c 20 61 | 64 64 69 74 69 6f 6e 61 | or 1, a|dditiona|
|00003b10| 6c 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 73 |l inform|ation as|
|00003b20| 20 74 6f 20 74 68 65 20 | 73 6f 75 72 63 65 20 6f | to the |source o|
|00003b30| 66 20 74 68 65 20 65 72 | 72 6f 72 20 63 6f 64 65 |f the er|ror code|
|00003b40| 20 69 73 0a 6e 65 65 64 | 65 64 20 74 6f 20 64 65 | is.need|ed to de|
|00003b50| 74 65 72 6d 69 6e 65 20 | 77 68 69 63 68 20 74 61 |termine |which ta|
|00003b60| 62 6c 65 20 74 6f 20 6c | 6f 6f 6b 20 61 74 2e 20 |ble to l|ook at. |
|00003b70| 20 53 6f 6d 65 74 69 6d | 65 73 20 6e 6f 20 74 65 | Sometim|es no te|
|00003b80| 78 74 20 6d 65 73 73 61 | 67 65 73 20 61 72 65 0a |xt messa|ges are.|
|00003b90| 73 75 70 70 6c 69 65 64 | 20 61 74 20 61 6c 6c 2c |supplied| at all,|
|00003ba0| 20 61 6e 64 20 74 68 65 | 20 70 72 6f 67 72 61 6d | and the| program|
|00003bb0| 6d 65 72 20 6d 75 73 74 | 20 73 75 70 70 6c 79 20 |mer must| supply |
|00003bc0| 74 68 65 6d 20 61 74 20 | 61 6e 79 20 70 6f 69 6e |them at |any poin|
|00003bd0| 74 20 61 74 20 77 68 69 | 63 68 0a 68 65 20 6d 61 |t at whi|ch.he ma|
|00003be0| 79 20 77 69 73 68 20 74 | 6f 20 72 65 70 6f 72 74 |y wish t|o report|
|00003bf0| 20 65 72 72 6f 72 20 63 | 6f 6e 64 69 74 69 6f 6e | error c|ondition|
|00003c00| 73 2e 0a 4f 66 74 65 6e | 2c 20 61 20 67 6c 6f 62 |s..Often|, a glob|
|00003c10| 61 6c 20 76 61 72 69 61 | 62 6c 65 20 69 73 20 61 |al varia|ble is a|
|00003c20| 73 73 69 67 6e 65 64 20 | 73 6f 6d 65 20 76 61 6c |ssigned |some val|
|00003c30| 75 65 20 64 65 73 63 72 | 69 62 69 6e 67 20 74 68 |ue descr|ibing th|
|00003c40| 65 20 65 72 72 6f 72 2c | 20 62 75 74 0a 74 68 65 |e error,| but.the|
|00003c50| 20 70 72 6f 67 72 61 6d | 6d 65 72 20 68 61 73 20 | program|mer has |
|00003c60| 74 6f 20 6b 6e 6f 77 20 | 69 6e 20 65 61 63 68 20 |to know |in each |
|00003c70| 63 61 73 65 20 77 68 65 | 74 68 65 72 20 74 6f 20 |case whe|ther to |
|00003c80| 6c 6f 6f 6b 20 61 74 20 | 40 63 6f 64 65 7b 65 72 |look at |@code{er|
|00003c90| 72 6e 6f 7d 2c 0a 40 63 | 6f 64 65 7b 68 5f 65 72 |rno},.@c|ode{h_er|
|00003ca0| 72 6e 6f 7d 2c 20 74 68 | 65 20 72 65 74 75 72 6e |rno}, th|e return|
|00003cb0| 20 76 61 6c 75 65 20 66 | 72 6f 6d 20 40 63 6f 64 | value f|rom @cod|
|00003cc0| 65 7b 68 65 73 5f 65 72 | 72 28 29 7d 2c 20 6f 72 |e{hes_er|r()}, or|
|00003cd0| 20 77 68 61 74 65 76 65 | 72 20 6f 74 68 65 72 0a | whateve|r other.|
|00003ce0| 76 61 72 69 61 62 6c 65 | 73 20 6f 72 20 72 6f 75 |variable|s or rou|
|00003cf0| 74 69 6e 65 73 20 61 72 | 65 20 73 70 65 63 69 66 |tines ar|e specif|
|00003d00| 69 65 64 2e 0a 41 6e 64 | 20 77 68 61 74 20 68 61 |ied..And| what ha|
|00003d10| 70 70 65 6e 73 20 69 66 | 20 73 6f 6d 65 74 68 69 |ppens if| somethi|
|00003d20| 6e 67 0a 69 6e 20 74 68 | 65 20 70 72 6f 63 65 64 |ng.in th|e proced|
|00003d30| 75 72 65 20 6f 66 0a 65 | 78 61 6d 69 6e 69 6e 67 |ure of.e|xamining|
|00003d40| 20 6f 72 20 72 65 70 6f | 72 74 69 6e 67 20 74 68 | or repo|rting th|
|00003d50| 65 20 65 72 72 6f 72 20 | 63 68 61 6e 67 65 73 20 |e error |changes |
|00003d60| 74 68 65 20 73 61 6d 65 | 20 76 61 72 69 61 62 6c |the same| variabl|
|00003d70| 65 3f 0a 0a 54 68 65 20 | 70 61 63 6b 61 67 65 20 |e?..The |package |
|00003d80| 77 65 20 68 61 76 65 20 | 64 65 76 65 6c 6f 70 65 |we have |develope|
|00003d90| 64 20 69 73 20 61 6e 20 | 61 74 74 65 6d 70 74 20 |d is an |attempt |
|00003da0| 74 6f 20 70 72 65 73 65 | 6e 74 20 61 20 63 6f 6d |to prese|nt a com|
|00003db0| 6d 6f 6e 0a 65 72 72 6f | 72 2d 68 61 6e 64 6c 69 |mon.erro|r-handli|
|00003dc0| 6e 67 20 6d 65 63 68 61 | 6e 69 73 6d 20 74 6f 20 |ng mecha|nism to |
|00003dd0| 6d 61 6e 69 70 75 6c 61 | 74 65 20 74 68 65 20 6d |manipula|te the m|
|00003de0| 6f 73 74 20 63 6f 6d 6d | 6f 6e 20 66 6f 72 6d 20 |ost comm|on form |
|00003df0| 6f 66 20 65 72 72 6f 72 | 20 63 6f 64 65 0a 69 6e |of error| code.in|
|00003e00| 20 61 20 66 61 73 68 69 | 6f 6e 20 74 68 61 74 20 | a fashi|on that |
|00003e10| 64 6f 65 73 20 6e 6f 74 | 20 68 61 76 65 20 74 68 |does not| have th|
|00003e20| 65 20 70 72 6f 62 6c 65 | 6d 73 20 6c 69 73 74 65 |e proble|ms liste|
|00003e30| 64 20 61 62 6f 76 65 2e | 0a 0a 41 20 6c 69 73 74 |d above.|..A list|
|00003e40| 20 6f 66 20 75 70 20 74 | 6f 20 32 35 36 20 74 65 | of up t|o 256 te|
|00003e50| 78 74 20 6d 65 73 73 61 | 67 65 73 20 69 73 20 73 |xt messa|ges is s|
|00003e60| 75 70 70 6c 69 65 64 20 | 74 6f 20 61 20 74 72 61 |upplied |to a tra|
|00003e70| 6e 73 6c 61 74 6f 72 20 | 77 65 20 68 61 76 65 0a |nslator |we have.|
|00003e80| 77 72 69 74 74 65 6e 2c | 20 61 6c 6f 6e 67 20 77 |written,| along w|
|00003e90| 69 74 68 20 74 68 65 20 | 74 68 72 65 65 2d 20 74 |ith the |three- t|
|00003ea0| 6f 20 66 6f 75 72 2d 63 | 68 61 72 61 63 74 65 72 |o four-c|haracter|
|00003eb0| 20 60 60 6e 61 6d 65 27 | 27 20 6f 66 20 74 68 65 | ``name'|' of the|
|00003ec0| 20 65 72 72 6f 72 0a 74 | 61 62 6c 65 2e 20 20 54 | error.t|able. T|
|00003ed0| 68 65 20 6c 69 62 72 61 | 72 79 20 75 73 69 6e 67 |he libra|ry using|
|00003ee0| 20 74 68 69 73 20 65 72 | 72 6f 72 20 74 61 62 6c | this er|ror tabl|
|00003ef0| 65 20 6e 65 65 64 20 6f | 6e 6c 79 20 63 61 6c 6c |e need o|nly call|
|00003f00| 20 61 20 72 6f 75 74 69 | 6e 65 0a 67 65 6e 65 72 | a routi|ne.gener|
|00003f10| 61 74 65 64 20 66 72 6f | 6d 20 74 68 69 73 20 65 |ated fro|m this e|
|00003f20| 72 72 6f 72 2d 74 61 62 | 6c 65 20 73 6f 75 72 63 |rror-tab|le sourc|
|00003f30| 65 20 74 6f 20 6d 61 6b | 65 20 74 68 65 20 74 61 |e to mak|e the ta|
|00003f40| 62 6c 65 20 60 60 6b 6e | 6f 77 6e 27 27 20 74 6f |ble ``kn|own'' to|
|00003f50| 20 74 68 65 0a 63 6f 6d | 5f 65 72 72 20 6c 69 62 | the.com|_err lib|
|00003f60| 72 61 72 79 2c 20 61 6e | 64 20 61 6e 79 20 65 72 |rary, an|d any er|
|00003f70| 72 6f 72 20 63 6f 64 65 | 20 74 68 65 20 6c 69 62 |ror code| the lib|
|00003f80| 72 61 72 79 20 67 65 6e | 65 72 61 74 65 73 20 63 |rary gen|erates c|
|00003f90| 61 6e 20 62 65 20 63 6f | 6e 76 65 72 74 65 64 0a |an be co|nverted.|
|00003fa0| 74 6f 20 74 68 65 20 63 | 6f 72 72 65 73 70 6f 6e |to the c|orrespon|
|00003fb0| 64 69 6e 67 20 65 72 72 | 6f 72 20 6d 65 73 73 61 |ding err|or messa|
|00003fc0| 67 65 2e 20 20 54 68 65 | 72 65 20 69 73 20 61 6c |ge. The|re is al|
|00003fd0| 73 6f 20 61 20 64 65 66 | 61 75 6c 74 20 66 6f 72 |so a def|ault for|
|00003fe0| 6d 61 74 20 66 6f 72 0a | 65 72 72 6f 72 20 63 6f |mat for.|error co|
|00003ff0| 64 65 73 20 61 63 63 69 | 64 65 6e 74 61 6c 6c 79 |des acci|dentally|
|00004000| 20 72 65 74 75 72 6e 65 | 64 20 62 65 66 6f 72 65 | returne|d before|
|00004010| 20 6d 61 6b 69 6e 67 20 | 74 68 65 20 74 61 62 6c | making |the tabl|
|00004020| 65 20 6b 6e 6f 77 6e 2c | 20 77 68 69 63 68 20 69 |e known,| which i|
|00004030| 73 0a 6f 66 20 74 68 65 | 20 66 6f 72 6d 20 40 73 |s.of the| form @s|
|00004040| 61 6d 70 7b 75 6e 6b 6e | 6f 77 6e 20 63 6f 64 65 |amp{unkn|own code|
|00004050| 20 66 6f 6f 20 33 32 7d | 2c 20 77 68 65 72 65 20 | foo 32}|, where |
|00004060| 40 73 61 6d 70 7b 66 6f | 6f 7d 20 77 6f 75 6c 64 |@samp{fo|o} would|
|00004070| 20 62 65 20 74 68 65 20 | 6e 61 6d 65 0a 6f 66 20 | be the |name.of |
|00004080| 74 68 65 20 74 61 62 6c | 65 2e 0a 0a 40 73 65 63 |the tabl|e...@sec|
|00004090| 74 69 6f 6e 20 45 72 72 | 6f 72 20 63 6f 64 65 73 |tion Err|or codes|
|000040a0| 0a 0a 45 72 72 6f 72 20 | 63 6f 64 65 73 20 74 68 |..Error |codes th|
|000040b0| 65 6d 73 65 6c 76 65 73 | 20 61 72 65 20 33 32 20 |emselves| are 32 |
|000040c0| 62 69 74 20 28 73 69 67 | 6e 65 64 29 20 69 6e 74 |bit (sig|ned) int|
|000040d0| 65 67 65 72 73 2c 20 6f | 66 20 77 68 69 63 68 20 |egers, o|f which |
|000040e0| 74 68 65 20 68 69 67 68 | 0a 6f 72 64 65 72 20 32 |the high|.order 2|
|000040f0| 34 20 62 69 74 73 20 61 | 72 65 20 61 6e 20 69 64 |4 bits a|re an id|
|00004100| 65 6e 74 69 66 69 65 72 | 20 6f 66 20 77 68 69 63 |entifier| of whic|
|00004110| 68 20 65 72 72 6f 72 20 | 74 61 62 6c 65 20 74 68 |h error |table th|
|00004120| 65 20 65 72 72 6f 72 20 | 63 6f 64 65 20 69 73 0a |e error |code is.|
|00004130| 66 72 6f 6d 2c 20 61 6e | 64 20 74 68 65 20 6c 6f |from, an|d the lo|
|00004140| 77 20 6f 72 64 65 72 20 | 38 20 62 69 74 73 20 61 |w order |8 bits a|
|00004150| 72 65 20 61 20 73 65 71 | 75 65 6e 74 69 61 6c 20 |re a seq|uential |
|00004160| 65 72 72 6f 72 20 6e 75 | 6d 62 65 72 20 77 69 74 |error nu|mber wit|
|00004170| 68 69 6e 0a 74 68 65 20 | 74 61 62 6c 65 2e 20 20 |hin.the |table. |
|00004180| 41 6e 20 65 72 72 6f 72 | 20 63 6f 64 65 20 6d 61 |An error| code ma|
|00004190| 79 20 74 68 75 73 20 62 | 65 20 65 61 73 69 6c 79 |y thus b|e easily|
|000041a0| 20 64 65 63 6f 6d 70 6f | 73 65 64 20 69 6e 74 6f | decompo|sed into|
|000041b0| 20 69 74 73 20 63 6f 6d | 70 6f 6e 65 6e 74 0a 70 | its com|ponent.p|
|000041c0| 61 72 74 73 2e 20 20 4f | 6e 6c 79 20 74 68 65 20 |arts. O|nly the |
|000041d0| 6c 6f 77 65 73 74 20 33 | 32 20 62 69 74 73 20 6f |lowest 3|2 bits o|
|000041e0| 66 20 61 6e 20 65 72 72 | 6f 72 20 63 6f 64 65 20 |f an err|or code |
|000041f0| 61 72 65 20 63 6f 6e 73 | 69 64 65 72 65 64 20 73 |are cons|idered s|
|00004200| 69 67 6e 69 66 69 63 61 | 6e 74 0a 6f 6e 20 73 79 |ignifica|nt.on sy|
|00004210| 73 74 65 6d 73 20 77 68 | 69 63 68 20 73 75 70 70 |stems wh|ich supp|
|00004220| 6f 72 74 20 77 69 64 65 | 72 20 76 61 6c 75 65 73 |ort wide|r values|
|00004230| 2e 0a 0a 45 72 72 6f 72 | 20 74 61 62 6c 65 20 30 |...Error| table 0|
|00004240| 20 69 73 20 64 65 66 69 | 6e 65 64 20 74 6f 20 6d | is defi|ned to m|
|00004250| 61 74 63 68 20 74 68 65 | 20 55 4e 49 58 20 73 79 |atch the| UNIX sy|
|00004260| 73 74 65 6d 20 63 61 6c | 6c 20 65 72 72 6f 72 20 |stem cal|l error |
|00004270| 74 61 62 6c 65 0a 28 40 | 63 6f 64 65 7b 73 79 73 |table.(@|code{sys|
|00004280| 5f 65 72 72 6c 69 73 74 | 7d 29 3b 20 74 68 69 73 |_errlist|}); this|
|00004290| 20 61 6c 6c 6f 77 73 20 | 40 63 6f 64 65 7b 65 72 | allows |@code{er|
|000042a0| 72 6e 6f 7d 20 76 61 6c | 75 65 73 20 74 6f 20 62 |rno} val|ues to b|
|000042b0| 65 20 75 73 65 64 20 64 | 69 72 65 63 74 6c 79 0a |e used d|irectly.|
|000042c0| 69 6e 20 74 68 65 20 6c | 69 62 72 61 72 79 20 28 |in the l|ibrary (|
|000042d0| 61 73 73 75 6d 69 6e 67 | 20 74 68 61 74 20 40 63 |assuming| that @c|
|000042e0| 6f 64 65 7b 65 72 72 6e | 6f 7d 20 69 73 20 6f 66 |ode{errn|o} is of|
|000042f0| 20 61 20 74 79 70 65 20 | 77 69 74 68 20 74 68 65 | a type |with the|
|00004300| 20 73 61 6d 65 20 77 69 | 64 74 68 0a 61 73 20 40 | same wi|dth.as @|
|00004310| 74 7b 6c 6f 6e 67 7d 29 | 2e 20 20 4f 74 68 65 72 |t{long})|. Other|
|00004320| 20 65 72 72 6f 72 20 74 | 61 62 6c 65 20 6e 75 6d | error t|able num|
|00004330| 62 65 72 73 20 61 72 65 | 20 66 6f 72 6d 65 64 20 |bers are| formed |
|00004340| 62 79 20 63 6f 6d 70 61 | 63 74 69 6e 67 20 74 6f |by compa|cting to|
|00004350| 67 65 74 68 65 72 0a 74 | 68 65 20 66 69 72 73 74 |gether.t|he first|
|00004360| 20 66 6f 75 72 20 63 68 | 61 72 61 63 74 65 72 73 | four ch|aracters|
|00004370| 20 6f 66 20 74 68 65 20 | 65 72 72 6f 72 20 74 61 | of the |error ta|
|00004380| 62 6c 65 20 6e 61 6d 65 | 2e 20 20 54 68 65 20 6d |ble name|. The m|
|00004390| 61 70 70 69 6e 67 20 62 | 65 74 77 65 65 6e 0a 63 |apping b|etween.c|
|000043a0| 68 61 72 61 63 74 65 72 | 73 20 69 6e 20 74 68 65 |haracter|s in the|
|000043b0| 20 6e 61 6d 65 20 61 6e | 64 20 6e 75 6d 65 72 69 | name an|d numeri|
|000043c0| 63 20 76 61 6c 75 65 73 | 20 69 6e 20 74 68 65 20 |c values| in the |
|000043d0| 65 72 72 6f 72 20 63 6f | 64 65 20 61 72 65 20 64 |error co|de are d|
|000043e0| 65 66 69 6e 65 64 20 69 | 6e 0a 61 20 73 79 73 74 |efined i|n.a syst|
|000043f0| 65 6d 2d 69 6e 64 65 70 | 65 6e 64 65 6e 74 20 66 |em-indep|endent f|
|00004400| 61 73 68 69 6f 6e 2c 20 | 73 6f 20 74 68 61 74 20 |ashion, |so that |
|00004410| 74 77 6f 20 73 79 73 74 | 65 6d 73 20 74 68 61 74 |two syst|ems that|
|00004420| 20 63 61 6e 20 70 61 73 | 73 20 69 6e 74 65 67 72 | can pas|s integr|
|00004430| 61 6c 0a 76 61 6c 75 65 | 73 20 62 65 74 77 65 65 |al.value|s betwee|
|00004440| 6e 20 74 68 65 6d 20 63 | 61 6e 20 72 65 6c 69 61 |n them c|an relia|
|00004450| 62 6c 79 20 70 61 73 73 | 20 65 72 72 6f 72 20 63 |bly pass| error c|
|00004460| 6f 64 65 73 20 77 69 74 | 68 6f 75 74 20 6c 6f 73 |odes wit|hout los|
|00004470| 73 20 6f 66 20 6d 65 61 | 6e 69 6e 67 3b 0a 74 68 |s of mea|ning;.th|
|00004480| 69 73 20 73 68 6f 75 6c | 64 20 77 6f 72 6b 20 65 |is shoul|d work e|
|00004490| 76 65 6e 20 69 66 20 74 | 68 65 20 63 68 61 72 61 |ven if t|he chara|
|000044a0| 63 74 65 72 20 73 65 74 | 73 20 75 73 65 64 20 61 |cter set|s used a|
|000044b0| 72 65 20 6e 6f 74 20 74 | 68 65 20 73 61 6d 65 2e |re not t|he same.|
|000044c0| 0a 28 48 6f 77 65 76 65 | 72 2c 20 69 66 20 74 68 |.(Howeve|r, if th|
|000044d0| 69 73 20 69 73 20 74 6f | 20 62 65 20 64 6f 6e 65 |is is to| be done|
|000044e0| 2c 20 65 72 72 6f 72 20 | 74 61 62 6c 65 20 30 20 |, error |table 0 |
|000044f0| 73 68 6f 75 6c 64 20 62 | 65 20 61 76 6f 69 64 65 |should b|e avoide|
|00004500| 64 2c 20 73 69 6e 63 65 | 20 74 68 65 0a 6c 6f 63 |d, since| the.loc|
|00004510| 61 6c 20 73 79 73 74 65 | 6d 20 63 61 6c 6c 20 65 |al syste|m call e|
|00004520| 72 72 6f 72 20 74 61 62 | 6c 65 73 20 6d 61 79 20 |rror tab|les may |
|00004530| 64 69 66 66 65 72 2e 29 | 0a 0a 41 6e 79 20 76 61 |differ.)|..Any va|
|00004540| 72 69 61 62 6c 65 20 77 | 68 69 63 68 20 69 73 20 |riable w|hich is |
|00004550| 74 6f 20 63 6f 6e 74 61 | 69 6e 20 61 6e 20 65 72 |to conta|in an er|
|00004560| 72 6f 72 20 63 6f 64 65 | 20 73 68 6f 75 6c 64 20 |ror code| should |
|00004570| 62 65 20 64 65 63 6c 61 | 72 65 64 20 40 74 7b 6c |be decla|red @t{l|
|00004580| 6f 6e 67 7d 2e 0a 54 68 | 65 20 64 72 61 66 74 20 |ong}..Th|e draft |
|00004590| 70 72 6f 70 6f 73 65 64 | 20 41 6d 65 72 69 63 61 |proposed| America|
|000045a0| 6e 20 4e 61 74 69 6f 6e | 61 6c 20 53 74 61 6e 64 |n Nation|al Stand|
|000045b0| 61 72 64 20 66 6f 72 20 | 43 20 28 61 73 20 6f 66 |ard for |C (as of|
|000045c0| 20 4d 61 79 2c 20 31 39 | 38 38 29 0a 72 65 71 75 | May, 19|88).requ|
|000045d0| 69 72 65 73 20 74 68 61 | 74 20 40 74 7b 6c 6f 6e |ires tha|t @t{lon|
|000045e0| 67 7d 20 76 61 72 69 61 | 62 6c 65 73 20 62 65 20 |g} varia|bles be |
|000045f0| 61 74 20 6c 65 61 73 74 | 20 33 32 20 62 69 74 73 |at least| 32 bits|
|00004600| 3b 20 61 6e 79 20 73 79 | 73 74 65 6d 20 77 68 69 |; any sy|stem whi|
|00004610| 63 68 20 64 6f 65 73 0a | 6e 6f 74 20 73 75 70 70 |ch does.|not supp|
|00004620| 6f 72 74 20 33 32 2d 62 | 69 74 20 40 74 7b 6c 6f |ort 32-b|it @t{lo|
|00004630| 6e 67 7d 20 76 61 6c 75 | 65 73 20 63 61 6e 6e 6f |ng} valu|es canno|
|00004640| 74 20 6d 61 6b 65 20 75 | 73 65 20 6f 66 20 74 68 |t make u|se of th|
|00004650| 69 73 20 70 61 63 6b 61 | 67 65 20 28 6e 6f 72 0a |is packa|ge (nor.|
|00004660| 6d 75 63 68 20 6f 74 68 | 65 72 20 73 6f 66 74 77 |much oth|er softw|
|00004670| 61 72 65 20 74 68 61 74 | 20 61 73 73 75 6d 65 73 |are that| assumes|
|00004680| 20 61 6e 20 41 4e 53 49 | 2d 43 20 65 6e 76 69 72 | an ANSI|-C envir|
|00004690| 6f 6e 6d 65 6e 74 20 62 | 61 73 65 29 20 77 69 74 |onment b|ase) wit|
|000046a0| 68 6f 75 74 0a 73 69 67 | 6e 69 66 69 63 61 6e 74 |hout.sig|nificant|
|000046b0| 20 65 66 66 6f 72 74 2e | 0a 0a 40 73 65 63 74 69 | effort.|..@secti|
|000046c0| 6f 6e 20 45 72 72 6f 72 | 20 74 61 62 6c 65 20 73 |on Error| table s|
|000046d0| 6f 75 72 63 65 20 66 69 | 6c 65 0a 0a 54 68 65 20 |ource fi|le..The |
|000046e0| 65 72 72 6f 72 20 74 61 | 62 6c 65 20 73 6f 75 72 |error ta|ble sour|
|000046f0| 63 65 20 66 69 6c 65 20 | 62 65 67 69 6e 73 20 77 |ce file |begins w|
|00004700| 69 74 68 20 74 68 65 20 | 64 65 63 6c 61 72 61 74 |ith the |declarat|
|00004710| 69 6f 6e 20 6f 66 20 74 | 68 65 20 74 61 62 6c 65 |ion of t|he table|
|00004720| 20 6e 61 6d 65 2c 0a 61 | 73 0a 0a 40 65 78 61 6d | name,.a|s..@exam|
|00004730| 70 6c 65 0a 65 72 72 6f | 72 5f 74 61 62 6c 65 20 |ple.erro|r_table |
|00004740| 40 76 61 72 7b 74 61 62 | 6c 65 6e 61 6d 65 7d 0a |@var{tab|lename}.|
|00004750| 40 65 6e 64 20 65 78 61 | 6d 70 6c 65 0a 0a 49 6e |@end exa|mple..In|
|00004760| 64 69 76 69 64 75 61 6c | 20 65 72 72 6f 72 20 63 |dividual| error c|
|00004770| 6f 64 65 73 20 61 72 65 | 0a 73 70 65 63 69 66 69 |odes are|.specifi|
|00004780| 65 64 20 77 69 74 68 0a | 0a 40 65 78 61 6d 70 6c |ed with.|.@exampl|
|00004790| 65 0a 65 72 72 6f 72 5f | 63 6f 64 65 20 40 76 61 |e.error_|code @va|
|000047a0| 72 7b 45 52 52 4f 52 5f | 4e 41 4d 45 7d 2c 20 40 |r{ERROR_|NAME}, @|
|000047b0| 76 61 72 7b 22 74 65 78 | 74 20 6d 65 73 73 61 67 |var{"tex|t messag|
|000047c0| 65 22 7d 0a 40 65 6e 64 | 20 65 78 61 6d 70 6c 65 |e"}.@end| example|
|000047d0| 0a 0a 77 68 65 72 65 20 | 40 73 61 6d 70 7b 65 63 |..where |@samp{ec|
|000047e0| 7d 20 63 61 6e 20 61 6c | 73 6f 20 62 65 20 75 73 |} can al|so be us|
|000047f0| 65 64 20 61 73 20 61 20 | 73 68 6f 72 74 20 66 6f |ed as a |short fo|
|00004800| 72 6d 20 6f 66 20 40 73 | 61 6d 70 7b 65 72 72 6f |rm of @s|amp{erro|
|00004810| 72 5f 63 6f 64 65 7d 2e | 20 20 54 6f 0a 69 6e 64 |r_code}.| To.ind|
|00004820| 69 63 61 74 65 20 74 68 | 65 20 65 6e 64 20 6f 66 |icate th|e end of|
|00004830| 20 74 68 65 20 74 61 62 | 6c 65 2c 20 75 73 65 20 | the tab|le, use |
|00004840| 40 73 61 6d 70 7b 65 6e | 64 7d 2e 20 20 54 68 75 |@samp{en|d}. Thu|
|00004850| 73 2c 20 61 20 28 73 68 | 6f 72 74 29 20 73 61 6d |s, a (sh|ort) sam|
|00004860| 70 6c 65 0a 65 72 72 6f | 72 20 74 61 62 6c 65 20 |ple.erro|r table |
|00004870| 6d 69 67 68 74 20 62 65 | 3a 0a 0a 40 65 78 61 6d |might be|:..@exam|
|00004880| 70 6c 65 0a 0a 20 20 20 | 20 20 20 20 20 65 72 72 |ple.. | err|
|00004890| 6f 72 5f 74 61 62 6c 65 | 20 20 20 20 20 64 73 63 |or_table| dsc|
|000048a0| 0a 0a 20 20 20 20 20 20 | 20 20 65 72 72 6f 72 5f |.. | error_|
|000048b0| 63 6f 64 65 20 20 20 20 | 20 20 44 53 43 5f 44 55 |code | DSC_DU|
|000048c0| 50 5f 4d 54 47 5f 4e 41 | 4d 45 2c 0a 20 20 20 20 |P_MTG_NA|ME,. |
|000048d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048e0| 20 20 20 20 22 4d 65 65 | 74 69 6e 67 20 61 6c 72 | "Mee|ting alr|
|000048f0| 65 61 64 79 20 65 78 69 | 73 74 73 22 0a 0a 20 20 |eady exi|sts".. |
|00004900| 20 20 20 20 20 20 65 63 | 20 20 20 20 20 20 20 20 | ec| |
|00004910| 20 20 20 20 20 20 44 53 | 43 5f 42 41 44 5f 50 41 | DS|C_BAD_PA|
|00004920| 54 48 2c 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |TH,. | |
|00004930| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 41 20 62 | | "A b|
|00004940| 61 64 20 6d 65 65 74 69 | 6e 67 20 70 61 74 68 6e |ad meeti|ng pathn|
|00004950| 61 6d 65 20 77 61 73 20 | 67 69 76 65 6e 22 0a 0a |ame was |given"..|
|00004960| 20 20 20 20 20 20 20 20 | 65 63 20 20 20 20 20 20 | |ec |
|00004970| 20 20 20 20 20 20 20 20 | 44 53 43 5f 42 41 44 5f | |DSC_BAD_|
|00004980| 4d 4f 44 45 53 2c 0a 20 | 20 20 20 20 20 20 20 20 |MODES,. | |
|00004990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 22 | | "|
|000049a0| 49 6e 76 61 6c 69 64 20 | 6d 6f 64 65 20 66 6f 72 |Invalid |mode for|
|000049b0| 20 74 68 69 73 20 61 63 | 63 65 73 73 20 63 6f 6e | this ac|cess con|
|000049c0| 74 72 6f 6c 20 6c 69 73 | 74 22 0a 0a 20 20 20 20 |trol lis|t".. |
|000049d0| 20 20 20 20 65 6e 64 0a | 0a 40 65 6e 64 20 65 78 | end.|.@end ex|
|000049e0| 61 6d 70 6c 65 0a 0a 40 | 73 65 63 74 69 6f 6e 20 |ample..@|section |
|000049f0| 54 68 65 20 65 72 72 6f | 72 2d 74 61 62 6c 65 20 |The erro|r-table |
|00004a00| 63 6f 6d 70 69 6c 65 72 | 0a 0a 54 68 65 20 65 72 |compiler|..The er|
|00004a10| 72 6f 72 20 74 61 62 6c | 65 20 63 6f 6d 70 69 6c |ror tabl|e compil|
|00004a20| 65 72 20 69 73 20 6e 61 | 6d 65 64 20 40 63 6f 64 |er is na|med @cod|
|00004a30| 65 7b 63 6f 6d 70 69 6c | 65 5f 65 74 7d 2e 20 20 |e{compil|e_et}. |
|00004a40| 49 74 20 74 61 6b 65 73 | 20 6f 6e 65 0a 61 72 67 |It takes| one.arg|
|00004a50| 75 6d 65 6e 74 2c 20 74 | 68 65 20 70 61 74 68 6e |ument, t|he pathn|
|00004a60| 61 6d 65 20 6f 66 20 61 | 20 66 69 6c 65 20 28 65 |ame of a| file (e|
|00004a70| 6e 64 69 6e 67 20 69 6e | 20 40 73 61 6d 70 7b 2e |nding in| @samp{.|
|00004a80| 65 74 7d 2c 20 65 2e 67 | 2e 2c 0a 40 73 61 6d 70 |et}, e.g|.,.@samp|
|00004a90| 7b 64 73 63 5f 65 72 72 | 2e 65 74 7d 29 20 63 6f |{dsc_err|.et}) co|
|00004aa0| 6e 74 61 69 6e 69 6e 67 | 20 61 6e 20 65 72 72 6f |ntaining| an erro|
|00004ab0| 72 20 74 61 62 6c 65 20 | 73 6f 75 72 63 65 20 66 |r table |source f|
|00004ac0| 69 6c 65 2e 20 20 49 74 | 20 70 61 72 73 65 73 20 |ile. It| parses |
|00004ad0| 74 68 65 0a 65 72 72 6f | 72 20 74 61 62 6c 65 2c |the.erro|r table,|
|00004ae0| 20 61 6e 64 20 67 65 6e | 65 72 61 74 65 73 20 74 | and gen|erates t|
|00004af0| 77 6f 20 6f 75 74 70 75 | 74 20 66 69 6c 65 73 20 |wo outpu|t files |
|00004b00| 2d 2d 20 61 20 43 20 68 | 65 61 64 65 72 20 66 69 |-- a C h|eader fi|
|00004b10| 6c 65 0a 28 40 73 61 6d | 70 7b 64 69 73 63 75 73 |le.(@sam|p{discus|
|00004b20| 73 5f 65 72 72 2e 68 7d | 29 20 77 68 69 63 68 20 |s_err.h}|) which |
|00004b30| 63 6f 6e 74 61 69 6e 73 | 20 64 65 66 69 6e 69 74 |contains| definit|
|00004b40| 69 6f 6e 73 20 6f 66 20 | 74 68 65 20 6e 75 6d 65 |ions of |the nume|
|00004b50| 72 69 63 61 6c 20 76 61 | 6c 75 65 73 0a 6f 66 20 |rical va|lues.of |
|00004b60| 74 68 65 20 65 72 72 6f | 72 20 63 6f 64 65 73 20 |the erro|r codes |
|00004b70| 64 65 66 69 6e 65 64 20 | 69 6e 20 74 68 65 20 65 |defined |in the e|
|00004b80| 72 72 6f 72 20 74 61 62 | 6c 65 2c 20 61 6e 64 20 |rror tab|le, and |
|00004b90| 61 20 43 20 73 6f 75 72 | 63 65 20 66 69 6c 65 20 |a C sour|ce file |
|00004ba0| 77 68 69 63 68 0a 73 68 | 6f 75 6c 64 20 62 65 20 |which.sh|ould be |
|00004bb0| 63 6f 6d 70 69 6c 65 64 | 20 61 6e 64 20 6c 69 6e |compiled| and lin|
|00004bc0| 6b 65 64 20 77 69 74 68 | 20 74 68 65 20 65 78 65 |ked with| the exe|
|00004bd0| 63 75 74 61 62 6c 65 2e | 20 20 54 68 65 20 68 65 |cutable.| The he|
|00004be0| 61 64 65 72 20 66 69 6c | 65 20 6d 75 73 74 20 62 |ader fil|e must b|
|00004bf0| 65 0a 69 6e 63 6c 75 64 | 65 64 20 69 6e 20 74 68 |e.includ|ed in th|
|00004c00| 65 20 73 6f 75 72 63 65 | 20 6f 66 20 61 20 6d 6f |e source| of a mo|
|00004c10| 64 75 6c 65 20 77 68 69 | 63 68 20 77 69 73 68 65 |dule whi|ch wishe|
|00004c20| 73 20 74 6f 20 72 65 66 | 65 72 65 6e 63 65 20 74 |s to ref|erence t|
|00004c30| 68 65 20 65 72 72 6f 72 | 0a 63 6f 64 65 73 20 64 |he error|.codes d|
|00004c40| 65 66 69 6e 65 64 3b 20 | 74 68 65 20 6f 62 6a 65 |efined; |the obje|
|00004c50| 63 74 20 6d 6f 64 75 6c | 65 20 67 65 6e 65 72 61 |ct modul|e genera|
|00004c60| 74 65 64 20 66 72 6f 6d | 20 74 68 65 20 43 20 63 |ted from| the C c|
|00004c70| 6f 64 65 20 6d 61 79 20 | 62 65 20 6c 69 6e 6b 65 |ode may |be linke|
|00004c80| 64 20 69 6e 0a 74 6f 20 | 61 20 70 72 6f 67 72 61 |d in.to |a progra|
|00004c90| 6d 20 77 68 69 63 68 20 | 77 69 73 68 65 73 20 74 |m which |wishes t|
|00004ca0| 6f 20 75 73 65 20 74 68 | 65 20 70 72 69 6e 74 65 |o use th|e printe|
|00004cb0| 64 20 66 6f 72 6d 73 20 | 6f 66 20 74 68 65 20 65 |d forms |of the e|
|00004cc0| 72 72 6f 72 20 63 6f 64 | 65 73 2e 0a 0a 54 68 69 |rror cod|es...Thi|
|00004cd0| 73 20 74 72 61 6e 73 6c | 61 74 6f 72 20 61 63 63 |s transl|ator acc|
|00004ce0| 65 70 74 73 20 61 20 40 | 6b 62 64 7b 2d 6c 61 6e |epts a @|kbd{-lan|
|00004cf0| 67 75 61 67 65 20 40 76 | 61 72 7b 6c 61 6e 67 7d |guage @v|ar{lang}|
|00004d00| 7d 20 61 72 67 75 6d 65 | 6e 74 2c 20 77 68 69 63 |} argume|nt, whic|
|00004d10| 68 0a 64 65 74 65 72 6d | 69 6e 65 73 20 66 6f 72 |h.determ|ines for|
|00004d20| 20 77 68 69 63 68 20 6c | 61 6e 67 75 61 67 65 20 | which l|anguage |
|00004d30| 28 6f 72 20 6c 61 6e 67 | 75 61 67 65 20 76 61 72 |(or lang|uage var|
|00004d40| 69 61 6e 74 29 20 74 68 | 65 20 6f 75 74 70 75 74 |iant) th|e output|
|00004d50| 20 73 68 6f 75 6c 64 20 | 62 65 0a 77 72 69 74 74 | should |be.writt|
|00004d60| 65 6e 2e 20 20 41 74 20 | 74 68 65 20 6d 6f 6d 65 |en. At |the mome|
|00004d70| 6e 74 2c 20 40 76 61 72 | 7b 6c 61 6e 67 7d 20 69 |nt, @var|{lang} i|
|00004d80| 73 20 63 75 72 72 65 6e | 74 6c 79 20 6c 69 6d 69 |s curren|tly limi|
|00004d90| 74 65 64 20 74 6f 20 40 | 6b 62 64 7b 41 4e 53 49 |ted to @|kbd{ANSI|
|00004da0| 2d 43 7d 0a 61 6e 64 20 | 40 6b 62 64 7b 4b 26 52 |-C}.and |@kbd{K&R|
|00004db0| 2d 43 7d 2c 20 61 6e 64 | 20 73 6f 6d 65 20 61 62 |-C}, and| some ab|
|00004dc0| 62 72 65 76 69 61 74 65 | 64 20 66 6f 72 6d 73 20 |breviate|d forms |
|00004dd0| 6f 66 20 65 61 63 68 2e | 20 20 45 76 65 6e 74 75 |of each.| Eventu|
|00004de0| 61 6c 6c 79 2c 20 74 68 | 69 73 20 77 69 6c 6c 0a |ally, th|is will.|
|00004df0| 62 65 20 65 78 74 65 6e | 64 65 64 20 74 6f 20 69 |be exten|ded to i|
|00004e00| 6e 63 6c 75 64 65 20 73 | 6f 6d 65 20 73 75 70 70 |nclude s|ome supp|
|00004e10| 6f 72 74 20 66 6f 72 20 | 43 2b 2b 2e 20 20 54 68 |ort for |C++. Th|
|00004e20| 65 20 64 65 66 61 75 6c | 74 20 69 73 20 63 75 72 |e defaul|t is cur|
|00004e30| 72 65 6e 74 6c 79 0a 40 | 6b 62 64 7b 4b 26 52 2d |rently.@|kbd{K&R-|
|00004e40| 43 7d 2c 20 74 68 6f 75 | 67 68 20 74 68 65 20 67 |C}, thou|gh the g|
|00004e50| 65 6e 65 72 61 74 65 64 | 20 73 6f 75 72 63 65 73 |enerated| sources|
|00004e60| 20 77 69 6c 6c 20 68 61 | 76 65 20 41 4e 53 49 2d | will ha|ve ANSI-|
|00004e70| 43 20 63 6f 64 65 0a 63 | 6f 6e 64 69 74 69 6f 6e |C code.c|ondition|
|00004e80| 61 6c 69 7a 65 64 20 6f | 6e 20 74 68 65 20 73 79 |alized o|n the sy|
|00004e90| 6d 62 6f 6c 20 40 74 7b | 5f 5f 53 54 44 43 5f 5f |mbol @t{|__STDC__|
|00004ea0| 7d 2e 0a 0a 40 73 65 63 | 74 69 6f 6e 20 52 75 6e |}...@sec|tion Run|
|00004eb0| 2d 74 69 6d 65 20 73 75 | 70 70 6f 72 74 20 72 6f |-time su|pport ro|
|00004ec0| 75 74 69 6e 65 73 0a 0a | 41 6e 79 20 73 6f 75 72 |utines..|Any sour|
|00004ed0| 63 65 20 66 69 6c 65 20 | 77 68 69 63 68 20 75 73 |ce file |which us|
|00004ee0| 65 73 20 74 68 65 20 72 | 6f 75 74 69 6e 65 73 20 |es the r|outines |
|00004ef0| 73 75 70 70 6c 69 65 64 | 20 77 69 74 68 20 6f 72 |supplied| with or|
|00004f00| 20 70 72 6f 64 75 63 65 | 64 20 62 79 20 74 68 65 | produce|d by the|
|00004f10| 0a 63 6f 6d 5f 65 72 72 | 20 70 61 63 6b 61 67 65 |.com_err| package|
|00004f20| 20 73 68 6f 75 6c 64 20 | 69 6e 63 6c 75 64 65 20 | should |include |
|00004f30| 74 68 65 20 68 65 61 64 | 65 72 20 66 69 6c 65 20 |the head|er file |
|00004f40| 40 66 69 6c 65 7b 3c 63 | 6f 6d 5f 65 72 72 2e 68 |@file{<c|om_err.h|
|00004f50| 3e 7d 2e 20 20 49 74 0a | 63 6f 6e 74 61 69 6e 73 |>}. It.|contains|
|00004f60| 20 64 65 63 6c 61 72 61 | 74 69 6f 6e 73 20 61 6e | declara|tions an|
|00004f70| 64 20 64 65 66 69 6e 69 | 74 69 6f 6e 73 20 77 68 |d defini|tions wh|
|00004f80| 69 63 68 20 6d 61 79 20 | 62 65 20 6e 65 65 64 65 |ich may |be neede|
|00004f90| 64 20 6f 6e 20 73 6f 6d | 65 20 73 79 73 74 65 6d |d on som|e system|
|00004fa0| 73 2e 0a 28 53 6f 6d 65 | 20 66 75 6e 63 74 69 6f |s..(Some| functio|
|00004fb0| 6e 73 20 63 61 6e 6e 6f | 74 20 62 65 20 72 65 66 |ns canno|t be ref|
|00004fc0| 65 72 65 6e 63 65 64 20 | 70 72 6f 70 65 72 6c 79 |erenced |properly|
|00004fd0| 20 77 69 74 68 6f 75 74 | 20 74 68 65 20 72 65 74 | without| the ret|
|00004fe0| 75 72 6e 20 74 79 70 65 | 0a 64 65 63 6c 61 72 61 |urn type|.declara|
|00004ff0| 74 69 6f 6e 73 20 69 6e | 20 74 68 69 73 20 66 69 |tions in| this fi|
|00005000| 6c 65 2e 20 20 53 6f 6d | 65 20 66 75 6e 63 74 69 |le. Som|e functi|
|00005010| 6f 6e 73 20 6d 61 79 20 | 77 6f 72 6b 20 70 72 6f |ons may |work pro|
|00005020| 70 65 72 6c 79 20 6f 6e | 20 6d 6f 73 74 0a 61 72 |perly on| most.ar|
|00005030| 63 68 69 74 65 63 74 75 | 72 65 73 20 65 76 65 6e |chitectu|res even|
|00005040| 20 77 69 74 68 6f 75 74 | 20 74 68 65 20 68 65 61 | without| the hea|
|00005050| 64 65 72 20 66 69 6c 65 | 2c 20 62 75 74 20 72 65 |der file|, but re|
|00005060| 6c 79 69 6e 67 20 6f 6e | 20 74 68 69 73 20 69 73 |lying on| this is|
|00005070| 20 6e 6f 74 0a 72 65 63 | 6f 6d 6d 65 6e 64 65 64 | not.rec|ommended|
|00005080| 2e 29 0a 0a 54 68 65 20 | 72 75 6e 2d 74 69 6d 65 |.)..The |run-time|
|00005090| 20 73 75 70 70 6f 72 74 | 20 72 6f 75 74 69 6e 65 | support| routine|
|000050a0| 73 20 61 6e 64 20 76 61 | 72 69 61 62 6c 65 73 20 |s and va|riables |
|000050b0| 70 72 6f 76 69 64 65 64 | 20 76 69 61 20 74 68 69 |provided| via thi|
|000050c0| 73 20 70 61 63 6b 61 67 | 65 0a 69 6e 63 6c 75 64 |s packag|e.includ|
|000050d0| 65 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 3a |e the fo|llowing:|
|000050e0| 0a 0a 40 65 78 61 6d 70 | 6c 65 0a 76 6f 69 64 20 |..@examp|le.void |
|000050f0| 69 6e 69 74 69 61 6c 69 | 7a 65 5f 40 76 61 72 7b |initiali|ze_@var{|
|00005100| 78 78 78 78 7d 5f 65 72 | 72 6f 72 5f 74 61 62 6c |xxxx}_er|ror_tabl|
|00005110| 65 20 28 76 6f 69 64 29 | 3b 0a 40 65 6e 64 20 65 |e (void)|;.@end e|
|00005120| 78 61 6d 70 6c 65 0a 0a | 4f 6e 65 20 6f 66 20 74 |xample..|One of t|
|00005130| 68 65 73 65 20 72 6f 75 | 74 69 6e 65 73 20 69 73 |hese rou|tines is|
|00005140| 20 62 75 69 6c 74 20 62 | 79 20 74 68 65 20 65 72 | built b|y the er|
|00005150| 72 6f 72 20 63 6f 6d 70 | 69 6c 65 72 20 66 6f 72 |ror comp|iler for|
|00005160| 20 65 61 63 68 20 65 72 | 72 6f 72 20 74 61 62 6c | each er|ror tabl|
|00005170| 65 2e 0a 49 74 20 6d 61 | 6b 65 73 20 74 68 65 20 |e..It ma|kes the |
|00005180| 40 76 61 72 7b 78 78 78 | 78 7d 20 65 72 72 6f 72 |@var{xxx|x} error|
|00005190| 20 74 61 62 6c 65 20 60 | 60 6b 6e 6f 77 6e 27 27 | table `|`known''|
|000051a0| 20 74 6f 20 74 68 65 20 | 65 72 72 6f 72 20 72 65 | to the |error re|
|000051b0| 70 6f 72 74 69 6e 67 0a | 73 79 73 74 65 6d 2e 20 |porting.|system. |
|000051c0| 20 42 79 20 63 6f 6e 76 | 65 6e 74 69 6f 6e 2c 20 | By conv|ention, |
|000051d0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 73 68 6f |this rou|tine sho|
|000051e0| 75 6c 64 20 62 65 20 63 | 61 6c 6c 65 64 20 69 6e |uld be c|alled in|
|000051f0| 20 74 68 65 20 69 6e 69 | 74 69 61 6c 69 7a 61 74 | the ini|tializat|
|00005200| 69 6f 6e 0a 72 6f 75 74 | 69 6e 65 20 6f 66 20 74 |ion.rout|ine of t|
|00005210| 68 65 20 40 76 61 72 7b | 78 78 78 78 7d 20 6c 69 |he @var{|xxxx} li|
|00005220| 62 72 61 72 79 2e 20 20 | 49 66 20 74 68 65 20 6c |brary. |If the l|
|00005230| 69 62 72 61 72 79 20 68 | 61 73 20 6e 6f 20 69 6e |ibrary h|as no in|
|00005240| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 0a 72 6f 75 |itializa|tion.rou|
|00005250| 74 69 6e 65 2c 20 73 6f | 6d 65 20 63 6f 6d 62 69 |tine, so|me combi|
|00005260| 6e 61 74 69 6f 6e 20 6f | 66 20 72 6f 75 74 69 6e |nation o|f routin|
|00005270| 65 73 20 77 68 69 63 68 | 20 66 6f 72 6d 20 74 68 |es which| form th|
|00005280| 65 20 63 6f 72 65 20 6f | 66 20 74 68 65 20 6c 69 |e core o|f the li|
|00005290| 62 72 61 72 79 0a 73 68 | 6f 75 6c 64 20 65 6e 73 |brary.sh|ould ens|
|000052a0| 75 72 65 20 74 68 61 74 | 20 74 68 69 73 20 72 6f |ure that| this ro|
|000052b0| 75 74 69 6e 65 20 69 73 | 20 63 61 6c 6c 65 64 2e |utine is| called.|
|000052c0| 20 20 49 74 20 69 73 20 | 6e 6f 74 20 61 64 76 69 | It is |not advi|
|000052d0| 73 65 64 20 74 6f 20 6c | 65 61 76 65 20 69 74 0a |sed to l|eave it.|
|000052e0| 74 68 65 20 63 61 6c 6c | 65 72 20 74 6f 20 6d 61 |the call|er to ma|
|000052f0| 6b 65 20 74 68 69 73 20 | 63 61 6c 6c 2e 0a 0a 54 |ke this |call...T|
|00005300| 68 65 72 65 20 69 73 20 | 6e 6f 20 68 61 72 6d 20 |here is |no harm |
|00005310| 69 6e 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |in calli|ng this |
|00005320| 72 6f 75 74 69 6e 65 20 | 6d 6f 72 65 20 74 68 61 |routine |more tha|
|00005330| 6e 20 6f 6e 63 65 2e 0a | 0a 40 65 78 61 6d 70 6c |n once..|.@exampl|
|00005340| 65 0a 23 64 65 66 69 6e | 65 20 45 52 52 4f 52 5f |e.#defin|e ERROR_|
|00005350| 54 41 42 4c 45 5f 42 41 | 53 45 5f 40 76 61 72 7b |TABLE_BA|SE_@var{|
|00005360| 78 78 78 78 7d 20 40 76 | 61 72 7b 6e 6e 6e 6e 6e |xxxx} @v|ar{nnnnn|
|00005370| 7d 4c 0a 40 65 6e 64 20 | 65 78 61 6d 70 6c 65 0a |}L.@end |example.|
|00005380| 0a 54 68 69 73 20 73 79 | 6d 62 6f 6c 20 63 6f 6e |.This sy|mbol con|
|00005390| 74 61 69 6e 73 20 74 68 | 65 20 76 61 6c 75 65 20 |tains th|e value |
|000053a0| 6f 66 20 74 68 65 20 66 | 69 72 73 74 20 65 72 72 |of the f|irst err|
|000053b0| 6f 72 20 63 6f 64 65 20 | 65 6e 74 72 79 20 69 6e |or code |entry in|
|000053c0| 20 74 68 65 0a 73 70 65 | 63 69 66 69 65 64 20 74 | the.spe|cified t|
|000053d0| 61 62 6c 65 2e 0a 54 68 | 69 73 20 72 61 72 65 6c |able..Th|is rarel|
|000053e0| 79 20 6e 65 65 64 73 20 | 62 65 20 75 73 65 64 20 |y needs |be used |
|000053f0| 62 79 20 74 68 65 0a 70 | 72 6f 67 72 61 6d 6d 65 |by the.p|rogramme|
|00005400| 72 2e 0a 0a 40 65 78 61 | 6d 70 6c 65 0a 63 6f 6e |r...@exa|mple.con|
|00005410| 73 74 20 63 68 61 72 20 | 2a 65 72 72 6f 72 5f 6d |st char |*error_m|
|00005420| 65 73 73 61 67 65 20 28 | 6c 6f 6e 67 20 63 6f 64 |essage (|long cod|
|00005430| 65 29 3b 0a 40 65 6e 64 | 20 65 78 61 6d 70 6c 65 |e);.@end| example|
|00005440| 0a 0a 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 72 |..This r|outine r|
|00005450| 65 74 75 72 6e 73 20 74 | 68 65 20 63 68 61 72 61 |eturns t|he chara|
|00005460| 63 74 65 72 20 73 74 72 | 69 6e 67 20 65 72 72 6f |cter str|ing erro|
|00005470| 72 20 6d 65 73 73 61 67 | 65 20 61 73 73 6f 63 69 |r messag|e associ|
|00005480| 61 74 65 64 0a 77 69 74 | 68 20 40 63 6f 64 65 7b |ated.wit|h @code{|
|00005490| 63 6f 64 65 7d 3b 20 69 | 66 20 74 68 69 73 20 69 |code}; i|f this i|
|000054a0| 73 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |s associ|ated wit|
|000054b0| 68 20 61 6e 20 75 6e 6b | 6e 6f 77 6e 20 65 72 72 |h an unk|nown err|
|000054c0| 6f 72 20 74 61 62 6c 65 | 2c 20 6f 72 0a 69 66 20 |or table|, or.if |
|000054d0| 74 68 65 20 63 6f 64 65 | 20 69 73 20 61 73 73 6f |the code| is asso|
|000054e0| 63 69 61 74 65 64 20 77 | 69 74 68 20 61 20 6b 6e |ciated w|ith a kn|
|000054f0| 6f 77 6e 20 65 72 72 6f | 72 20 74 61 62 6c 65 20 |own erro|r table |
|00005500| 62 75 74 20 74 68 65 20 | 63 6f 64 65 20 69 73 20 |but the |code is |
|00005510| 6e 6f 74 0a 69 6e 20 74 | 68 65 20 74 61 62 6c 65 |not.in t|he table|
|00005520| 2c 20 61 20 73 74 72 69 | 6e 67 20 6f 66 20 74 68 |, a stri|ng of th|
|00005530| 65 20 66 6f 72 6d 20 40 | 73 61 6d 70 7b 55 6e 6b |e form @|samp{Unk|
|00005540| 6e 6f 77 6e 20 63 6f 64 | 65 20 40 76 61 72 7b 78 |nown cod|e @var{x|
|00005550| 78 78 78 20 6e 6e 7d 7d | 20 69 73 0a 72 65 74 75 |xxx nn}}| is.retu|
|00005560| 72 6e 65 64 2c 20 77 68 | 65 72 65 20 40 76 61 72 |rned, wh|ere @var|
|00005570| 7b 78 78 78 78 7d 20 69 | 73 20 74 68 65 20 65 72 |{xxxx} i|s the er|
|00005580| 72 6f 72 20 74 61 62 6c | 65 20 6e 61 6d 65 20 70 |ror tabl|e name p|
|00005590| 72 6f 64 75 63 65 64 20 | 62 79 0a 72 65 76 65 72 |roduced |by.rever|
|000055a0| 73 69 6e 67 20 74 68 65 | 20 63 6f 6d 70 61 63 74 |sing the| compact|
|000055b0| 69 6f 6e 20 70 65 72 66 | 6f 72 6d 65 64 20 6f 6e |ion perf|ormed on|
|000055c0| 20 74 68 65 20 65 72 72 | 6f 72 20 74 61 62 6c 65 | the err|or table|
|000055d0| 20 6e 75 6d 62 65 72 20 | 69 6d 70 6c 69 65 64 0a | number |implied.|
|000055e0| 62 79 20 74 68 61 74 20 | 65 72 72 6f 72 20 63 6f |by that |error co|
|000055f0| 64 65 2c 20 61 6e 64 20 | 40 76 61 72 7b 6e 6e 7d |de, and |@var{nn}|
|00005600| 20 69 73 20 74 68 65 20 | 6f 66 66 73 65 74 20 66 | is the |offset f|
|00005610| 72 6f 6d 20 74 68 61 74 | 20 62 61 73 65 20 76 61 |rom that| base va|
|00005620| 6c 75 65 2e 0a 0a 41 6c | 74 68 6f 75 67 68 20 74 |lue...Al|though t|
|00005630| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 69 73 20 61 |his rout|ine is a|
|00005640| 76 61 69 6c 61 62 6c 65 | 20 66 6f 72 20 75 73 65 |vailable| for use|
|00005650| 20 77 68 65 6e 20 6e 65 | 65 64 65 64 2c 20 69 74 | when ne|eded, it|
|00005660| 73 20 75 73 65 20 73 68 | 6f 75 6c 64 20 62 65 0a |s use sh|ould be.|
|00005670| 6c 65 66 74 20 74 6f 20 | 63 69 72 63 75 6d 73 74 |left to |circumst|
|00005680| 61 6e 63 65 73 20 77 68 | 69 63 68 20 72 65 6e 64 |ances wh|ich rend|
|00005690| 65 72 20 40 63 6f 64 65 | 7b 63 6f 6d 5f 65 72 72 |er @code|{com_err|
|000056a0| 7d 20 28 62 65 6c 6f 77 | 29 20 75 6e 75 73 61 62 |} (below|) unusab|
|000056b0| 6c 65 2e 0a 0a 40 65 78 | 61 6d 70 6c 65 0a 76 6f |le...@ex|ample.vo|
|000056c0| 69 64 20 63 6f 6d 5f 65 | 72 72 20 28 63 6f 6e 73 |id com_e|rr (cons|
|000056d0| 74 20 63 68 61 72 20 2a | 77 68 6f 61 6d 69 2c 20 |t char *|whoami, |
|000056e0| 20 2f 2a 20 6d 6f 64 75 | 6c 65 20 72 65 70 6f 72 | /* modu|le repor|
|000056f0| 74 69 6e 67 20 65 72 72 | 6f 72 20 2a 2f 0a 20 20 |ting err|or */. |
|00005700| 20 20 20 20 20 20 20 20 | 20 20 20 20 6c 6f 6e 67 | | long|
|00005710| 20 63 6f 64 65 2c 20 20 | 20 20 20 20 20 20 20 20 | code, | |
|00005720| 20 2f 2a 20 65 72 72 6f | 72 20 63 6f 64 65 20 2a | /* erro|r code *|
|00005730| 2f 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |/. | |
|00005740| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 66 6f 72 6d |const ch|ar *form|
|00005750| 61 74 2c 20 20 2f 2a 20 | 66 6f 72 6d 61 74 20 66 |at, /* |format f|
|00005760| 6f 72 20 61 64 64 69 74 | 69 6f 6e 61 6c 20 64 65 |or addit|ional de|
|00005770| 74 61 69 6c 20 2a 2f 0a | 20 20 20 20 20 20 20 20 |tail */.| |
|00005780| 20 20 20 20 20 20 2e 2e | 2e 29 3b 20 20 20 20 20 | ..|.); |
|00005790| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 20 28 | | /* (|
|000057a0| 65 78 74 72 61 20 70 61 | 72 61 6d 65 74 65 72 73 |extra pa|rameters|
|000057b0| 29 20 2a 2f 0a 40 65 6e | 64 20 65 78 61 6d 70 6c |) */.@en|d exampl|
|000057c0| 65 0a 0a 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |e..This |routine |
|000057d0| 70 72 6f 76 69 64 65 73 | 20 61 6e 20 61 6c 74 65 |provides| an alte|
|000057e0| 72 6e 61 74 65 20 77 61 | 79 20 74 6f 20 70 72 69 |rnate wa|y to pri|
|000057f0| 6e 74 20 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |nt error| message|
|00005800| 73 20 74 6f 0a 73 74 61 | 6e 64 61 72 64 20 65 72 |s to.sta|ndard er|
|00005810| 72 6f 72 3b 20 69 74 20 | 61 6c 6c 6f 77 73 20 74 |ror; it |allows t|
|00005820| 68 65 20 65 72 72 6f 72 | 20 6d 65 73 73 61 67 65 |he error| message|
|00005830| 20 74 6f 20 62 65 20 70 | 61 73 73 65 64 20 69 6e | to be p|assed in|
|00005840| 20 61 73 20 61 0a 70 61 | 72 61 6d 65 74 65 72 2c | as a.pa|rameter,|
|00005850| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 69 6e 20 | rather |than in |
|00005860| 61 6e 20 65 78 74 65 72 | 6e 61 6c 20 76 61 72 69 |an exter|nal vari|
|00005870| 61 62 6c 65 2e 20 20 40 | 65 6d 70 68 7b 50 72 6f |able. @|emph{Pro|
|00005880| 76 69 64 65 20 67 72 61 | 6d 6d 61 74 69 63 61 6c |vide gra|mmatical|
|00005890| 0a 63 6f 6e 74 65 78 74 | 20 66 6f 72 20 60 60 6d |.context| for ``m|
|000058a0| 65 73 73 61 67 65 2e 27 | 27 7d 0a 0a 49 66 20 40 |essage.'|'}..If @|
|000058b0| 76 61 72 7b 66 6f 72 6d | 61 74 7d 20 69 73 20 40 |var{form|at} is @|
|000058c0| 63 6f 64 65 7b 28 63 68 | 61 72 20 2a 29 4e 55 4c |code{(ch|ar *)NUL|
|000058d0| 4c 7d 2c 20 74 68 65 20 | 66 6f 72 6d 61 74 74 65 |L}, the |formatte|
|000058e0| 64 20 6d 65 73 73 61 67 | 65 20 77 69 6c 6c 20 6e |d messag|e will n|
|000058f0| 6f 74 20 62 65 0a 70 72 | 69 6e 74 65 64 2e 20 20 |ot be.pr|inted. |
|00005900| 40 76 61 72 7b 66 6f 72 | 6d 61 74 7d 20 6d 61 79 |@var{for|mat} may|
|00005910| 20 6e 6f 74 20 62 65 20 | 6f 6d 69 74 74 65 64 2e | not be |omitted.|
|00005920| 0a 0a 40 65 78 61 6d 70 | 6c 65 0a 23 69 6e 63 6c |..@examp|le.#incl|
|00005930| 75 64 65 20 3c 73 74 64 | 61 72 67 2e 68 3e 0a 0a |ude <std|arg.h>..|
|00005940| 76 6f 69 64 20 63 6f 6d | 5f 65 72 72 5f 76 61 20 |void com|_err_va |
|00005950| 28 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 77 68 6f |(const c|har *who|
|00005960| 61 6d 69 2c 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ami,. | |
|00005970| 20 20 20 20 20 20 6c 6f | 6e 67 20 63 6f 64 65 2c | lo|ng code,|
|00005980| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005990| 20 20 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 66 6f | const |char *fo|
|000059a0| 72 6d 61 74 2c 0a 20 20 | 20 20 20 20 20 20 20 20 |rmat,. | |
|000059b0| 20 20 20 20 20 20 20 76 | 61 5f 6c 69 73 74 20 61 | v|a_list a|
|000059c0| 72 67 73 29 3b 0a 40 65 | 6e 64 20 65 78 61 6d 70 |rgs);.@e|nd examp|
|000059d0| 6c 65 0a 0a 54 68 69 73 | 20 72 6f 75 74 69 6e 65 |le..This| routine|
|000059e0| 20 70 72 6f 76 69 64 65 | 73 20 61 6e 20 69 6e 74 | provide|s an int|
|000059f0| 65 72 66 61 63 65 2c 20 | 65 71 75 69 76 61 6c 65 |erface, |equivale|
|00005a00| 6e 74 20 74 6f 20 40 63 | 6f 64 65 7b 63 6f 6d 5f |nt to @c|ode{com_|
|00005a10| 65 72 72 7d 20 61 62 6f | 76 65 2c 0a 77 68 69 63 |err} abo|ve,.whic|
|00005a20| 68 20 6d 61 79 20 62 65 | 20 75 73 65 64 20 62 79 |h may be| used by|
|00005a30| 20 68 69 67 68 65 72 2d | 6c 65 76 65 6c 20 76 61 | higher-|level va|
|00005a40| 72 69 61 64 69 63 20 66 | 75 6e 63 74 69 6f 6e 73 |riadic f|unctions|
|00005a50| 20 28 66 75 6e 63 74 69 | 6f 6e 73 20 77 68 69 63 | (functi|ons whic|
|00005a60| 68 0a 61 63 63 65 70 74 | 20 76 61 72 69 61 62 6c |h.accept| variabl|
|00005a70| 65 20 6e 75 6d 62 65 72 | 73 20 6f 66 20 61 72 67 |e number|s of arg|
|00005a80| 75 6d 65 6e 74 73 29 2e | 0a 0a 40 65 78 61 6d 70 |uments).|..@examp|
|00005a90| 6c 65 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 74 64 |le.#incl|ude <std|
|00005aa0| 61 72 67 2e 68 3e 0a 0a | 76 6f 69 64 20 28 2a 73 |arg.h>..|void (*s|
|00005ab0| 65 74 5f 63 6f 6d 5f 65 | 72 72 5f 68 6f 6f 6b 20 |et_com_e|rr_hook |
|00005ac0| 28 76 6f 69 64 20 28 2a | 70 72 6f 63 29 20 28 29 |(void (*|proc) ()|
|00005ad0| 29 29 20 28 29 3b 0a 0a | 76 6f 69 64 20 28 2a 40 |)) ();..|void (*@|
|00005ae0| 76 61 72 7b 70 72 6f 63 | 7d 29 20 28 63 6f 6e 73 |var{proc|}) (cons|
|00005af0| 74 20 63 68 61 72 20 2a | 77 68 6f 61 6d 69 2c 20 |t char *|whoami, |
|00005b00| 6c 6f 6e 67 20 63 6f 64 | 65 2c 20 76 61 5f 6c 69 |long cod|e, va_li|
|00005b10| 73 74 20 61 72 67 73 29 | 3b 0a 0a 76 6f 69 64 20 |st args)|;..void |
|00005b20| 72 65 73 65 74 5f 63 6f | 6d 5f 65 72 72 5f 68 6f |reset_co|m_err_ho|
|00005b30| 6f 6b 20 28 29 3b 0a 40 | 65 6e 64 20 65 78 61 6d |ok ();.@|end exam|
|00005b40| 70 6c 65 0a 0a 54 68 65 | 73 65 20 74 77 6f 20 72 |ple..The|se two r|
|00005b50| 6f 75 74 69 6e 65 73 20 | 61 6c 6c 6f 77 20 61 20 |outines |allow a |
|00005b60| 72 6f 75 74 69 6e 65 20 | 74 6f 20 62 65 20 64 79 |routine |to be dy|
|00005b70| 6e 61 6d 69 63 61 6c 6c | 79 20 73 75 62 73 74 69 |namicall|y substi|
|00005b80| 74 75 74 65 64 20 66 6f | 72 0a 40 73 61 6d 70 7b |tuted fo|r.@samp{|
|00005b90| 63 6f 6d 5f 65 72 72 7d | 2e 20 20 41 66 74 65 72 |com_err}|. After|
|00005ba0| 20 40 73 61 6d 70 7b 73 | 65 74 5f 63 6f 6d 5f 65 | @samp{s|et_com_e|
|00005bb0| 72 72 5f 68 6f 6f 6b 7d | 20 68 61 73 20 62 65 65 |rr_hook}| has bee|
|00005bc0| 6e 20 63 61 6c 6c 65 64 | 2c 0a 63 61 6c 6c 73 20 |n called|,.calls |
|00005bd0| 74 6f 20 40 73 61 6d 70 | 7b 63 6f 6d 5f 65 72 72 |to @samp|{com_err|
|00005be0| 7d 20 77 69 6c 6c 20 74 | 75 72 6e 20 69 6e 74 6f |} will t|urn into|
|00005bf0| 20 63 61 6c 6c 73 20 74 | 6f 20 74 68 65 20 6e 65 | calls t|o the ne|
|00005c00| 77 20 68 6f 6f 6b 20 72 | 6f 75 74 69 6e 65 2e 0a |w hook r|outine..|
|00005c10| 40 73 61 6d 70 7b 72 65 | 73 65 74 5f 63 6f 6d 5f |@samp{re|set_com_|
|00005c20| 65 72 72 5f 68 6f 6f 6b | 7d 20 74 75 72 6e 73 20 |err_hook|} turns |
|00005c30| 6f 66 66 20 74 68 69 73 | 20 68 6f 6f 6b 2e 20 20 |off this| hook. |
|00005c40| 54 68 69 73 20 6d 61 79 | 20 69 6e 74 65 6e 64 65 |This may| intende|
|00005c50| 64 20 74 6f 0a 62 65 20 | 75 73 65 64 20 69 6e 20 |d to.be |used in |
|00005c60| 64 61 65 6d 6f 6e 73 20 | 28 74 6f 20 75 73 65 20 |daemons |(to use |
|00005c70| 61 20 72 6f 75 74 69 6e | 65 20 77 68 69 63 68 20 |a routin|e which |
|00005c80| 63 61 6c 6c 73 20 40 76 | 61 72 7b 73 79 73 6c 6f |calls @v|ar{syslo|
|00005c90| 67 28 33 29 7d 29 2c 20 | 6f 72 0a 69 6e 20 61 20 |g(3)}), |or.in a |
|00005ca0| 77 69 6e 64 6f 77 20 73 | 79 73 74 65 6d 20 61 70 |window s|ystem ap|
|00005cb0| 70 6c 69 63 61 74 69 6f | 6e 20 28 77 68 69 63 68 |plicatio|n (which|
|00005cc0| 20 63 6f 75 6c 64 20 70 | 6f 70 20 75 70 20 61 20 | could p|op up a |
|00005cd0| 64 69 61 6c 6f 67 75 65 | 20 62 6f 78 29 2e 0a 0a |dialogue| box)...|
|00005ce0| 49 66 20 61 20 70 72 6f | 67 72 61 6d 20 69 73 20 |If a pro|gram is |
|00005cf0| 74 6f 20 62 65 20 75 73 | 65 64 20 69 6e 20 61 6e |to be us|ed in an|
|00005d00| 20 65 6e 76 69 72 6f 6e | 6d 65 6e 74 20 69 6e 20 | environ|ment in |
|00005d10| 77 68 69 63 68 20 73 69 | 6d 70 6c 79 20 70 72 69 |which si|mply pri|
|00005d20| 6e 74 69 6e 67 0a 6d 65 | 73 73 61 67 65 73 20 74 |nting.me|ssages t|
|00005d30| 6f 20 74 68 65 20 40 63 | 6f 64 65 7b 73 74 64 65 |o the @c|ode{stde|
|00005d40| 72 72 7d 20 73 74 72 65 | 61 6d 20 77 6f 75 6c 64 |rr} stre|am would|
|00005d50| 20 62 65 20 69 6e 61 70 | 70 72 6f 70 72 69 61 74 | be inap|propriat|
|00005d60| 65 20 28 73 75 63 68 20 | 61 73 20 69 6e 20 61 0a |e (such |as in a.|
|00005d70| 64 61 65 6d 6f 6e 20 70 | 72 6f 67 72 61 6d 20 77 |daemon p|rogram w|
|00005d80| 68 69 63 68 20 72 75 6e | 73 20 77 69 74 68 6f 75 |hich run|s withou|
|00005d90| 74 20 61 20 74 65 72 6d | 69 6e 61 6c 20 61 74 74 |t a term|inal att|
|00005da0| 61 63 68 65 64 29 2c 0a | 40 63 6f 64 65 7b 73 65 |ached),.|@code{se|
|00005db0| 74 5f 63 6f 6d 5f 65 72 | 72 5f 68 6f 6f 6b 7d 20 |t_com_er|r_hook} |
|00005dc0| 6d 61 79 20 62 65 20 75 | 73 65 64 20 74 6f 20 72 |may be u|sed to r|
|00005dd0| 65 64 69 72 65 63 74 20 | 6f 75 74 70 75 74 20 66 |edirect |output f|
|00005de0| 72 6f 6d 20 40 63 6f 64 | 65 7b 63 6f 6d 5f 65 72 |rom @cod|e{com_er|
|00005df0| 72 7d 2e 0a 54 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |r}..The |followin|
|00005e00| 67 20 69 73 20 61 6e 20 | 65 78 61 6d 70 6c 65 20 |g is an |example |
|00005e10| 6f 66 20 61 6e 20 65 72 | 72 6f 72 20 68 61 6e 64 |of an er|ror hand|
|00005e20| 6c 65 72 20 77 68 69 63 | 68 20 75 73 65 73 20 40 |ler whic|h uses @|
|00005e30| 76 61 72 7b 73 79 73 6c | 6f 67 28 33 29 7d 0a 61 |var{sysl|og(3)}.a|
|00005e40| 73 20 73 75 70 70 6c 69 | 65 64 20 69 6e 20 42 53 |s suppli|ed in BS|
|00005e50| 44 20 34 2e 33 3a 0a 0a | 40 65 78 61 6d 70 6c 65 |D 4.3:..|@example|
|00005e60| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 74 64 69 6f |.#includ|e <stdio|
|00005e70| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 73 74 |.h>.#inc|lude <st|
|00005e80| 64 61 72 67 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |darg.h>.|#include|
|00005e90| 20 3c 73 79 73 6c 6f 67 | 2e 68 3e 0a 0a 2f 2a 20 | <syslog|.h>../* |
|00005ea0| 65 78 74 65 72 6e 20 6f | 70 65 6e 6c 6f 67 20 28 |extern o|penlog (|
|00005eb0| 63 6f 6e 73 74 20 63 68 | 61 72 20 2a 20 6e 61 6d |const ch|ar * nam|
|00005ec0| 65 2c 20 69 6e 74 20 6c | 6f 67 6f 70 74 2c 20 69 |e, int l|ogopt, i|
|00005ed0| 6e 74 20 66 61 63 69 6c | 69 74 79 29 3b 20 2a 2f |nt facil|ity); */|
|00005ee0| 0a 2f 2a 20 65 78 74 65 | 72 6e 20 73 79 73 6c 6f |./* exte|rn syslo|
|00005ef0| 67 20 28 69 6e 74 20 70 | 72 69 6f 72 69 74 79 2c |g (int p|riority,|
|00005f00| 20 63 68 61 72 20 2a 20 | 6d 65 73 73 61 67 65 2c | char * |message,|
|00005f10| 20 2e 2e 2e 29 3b 20 2a | 2f 0a 0a 76 6f 69 64 20 | ...); *|/..void |
|00005f20| 68 6f 6f 6b 20 28 63 6f | 6e 73 74 20 63 68 61 72 |hook (co|nst char|
|00005f30| 20 2a 20 77 68 6f 61 6d | 69 2c 20 6c 6f 6e 67 20 | * whoam|i, long |
|00005f40| 63 6f 64 65 2c 0a 20 20 | 20 20 20 20 20 20 20 20 |code,. | |
|00005f50| 20 63 6f 6e 73 74 20 63 | 68 61 72 20 2a 20 66 6f | const c|har * fo|
|00005f60| 72 6d 61 74 2c 20 76 61 | 5f 6c 69 73 74 20 61 72 |rmat, va|_list ar|
|00005f70| 67 73 29 0a 40 7b 0a 20 | 20 20 20 63 68 61 72 20 |gs).@{. | char |
|00005f80| 62 75 66 66 65 72 5b 42 | 55 46 53 49 5a 5d 3b 0a |buffer[B|UFSIZ];.|
|00005f90| 20 20 20 20 73 74 61 74 | 69 63 20 69 6e 74 20 69 | stat|ic int i|
|00005fa0| 6e 69 74 69 61 6c 69 7a | 65 64 20 3d 20 30 3b 0a |nitializ|ed = 0;.|
|00005fb0| 20 20 20 20 69 66 20 28 | 21 69 6e 69 74 69 61 6c | if (|!initial|
|00005fc0| 69 7a 65 64 29 20 40 7b | 0a 20 20 20 20 20 20 20 |ized) @{|. |
|00005fd0| 20 6f 70 65 6e 6c 6f 67 | 20 28 77 68 6f 61 6d 69 | openlog| (whoami|
|00005fe0| 2c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,. | |
|00005ff0| 20 20 20 4c 4f 47 5f 4e | 4f 57 41 49 54 7c 4c 4f | LOG_N|OWAIT|LO|
|00006000| 47 5f 43 4f 4e 53 7c 4c | 4f 47 5f 50 49 44 7c 4c |G_CONS|L|OG_PID|L|
|00006010| 4f 47 5f 4e 44 45 4c 41 | 59 2c 0a 20 20 20 20 20 |OG_NDELA|Y,. |
|00006020| 20 20 20 20 20 20 20 20 | 20 20 20 20 4c 4f 47 5f | | LOG_|
|00006030| 44 41 45 4d 4f 4e 29 3b | 0a 20 20 20 20 20 20 20 |DAEMON);|. |
|00006040| 20 69 6e 69 74 69 61 6c | 69 7a 65 64 20 3d 20 31 | initial|ized = 1|
|00006050| 3b 0a 20 20 20 20 40 7d | 0a 20 20 20 20 76 73 70 |;. @}|. vsp|
|00006060| 72 69 6e 74 66 20 28 62 | 75 66 66 65 72 2c 20 66 |rintf (b|uffer, f|
|00006070| 6f 72 6d 61 74 2c 20 61 | 72 67 73 29 3b 0a 20 20 |ormat, a|rgs);. |
|00006080| 20 20 73 79 73 6c 6f 67 | 20 28 4c 4f 47 5f 45 52 | syslog| (LOG_ER|
|00006090| 52 2c 20 22 25 73 20 25 | 73 22 2c 20 65 72 72 6f |R, "%s %|s", erro|
|000060a0| 72 5f 6d 65 73 73 61 67 | 65 20 28 63 6f 64 65 29 |r_messag|e (code)|
|000060b0| 2c 20 62 75 66 66 65 72 | 29 3b 0a 40 7d 0a 40 65 |, buffer|);.@}.@e|
|000060c0| 6e 64 20 65 78 61 6d 70 | 6c 65 0a 0a 41 66 74 65 |nd examp|le..Afte|
|000060d0| 72 20 6d 61 6b 69 6e 67 | 20 74 68 65 20 63 61 6c |r making| the cal|
|000060e0| 6c 0a 40 63 6f 64 65 7b | 73 65 74 5f 63 6f 6d 5f |l.@code{|set_com_|
|000060f0| 65 72 72 5f 68 6f 6f 6b | 20 28 68 6f 6f 6b 29 3b |err_hook| (hook);|
|00006100| 7d 2c 0a 61 6e 79 20 63 | 61 6c 6c 73 20 74 6f 20 |},.any c|alls to |
|00006110| 40 63 6f 64 65 7b 63 6f | 6d 5f 65 72 72 7d 20 77 |@code{co|m_err} w|
|00006120| 69 6c 6c 20 72 65 73 75 | 6c 74 20 69 6e 20 6d 65 |ill resu|lt in me|
|00006130| 73 73 61 67 65 73 20 62 | 65 69 6e 67 20 73 65 6e |ssages b|eing sen|
|00006140| 74 20 74 6f 20 74 68 65 | 0a 40 76 61 72 7b 73 79 |t to the|.@var{sy|
|00006150| 73 6c 6f 67 64 7d 20 64 | 61 65 6d 6f 6e 20 66 6f |slogd} d|aemon fo|
|00006160| 72 20 6c 6f 67 67 69 6e | 67 2e 0a 54 68 65 20 6e |r loggin|g..The n|
|00006170| 61 6d 65 20 6f 66 20 74 | 68 65 20 70 72 6f 67 72 |ame of t|he progr|
|00006180| 61 6d 2c 20 40 73 61 6d | 70 7b 77 68 6f 61 6d 69 |am, @sam|p{whoami|
|00006190| 7d 2c 20 69 73 20 73 75 | 70 70 6c 69 65 64 20 74 |}, is su|pplied t|
|000061a0| 6f 20 74 68 65 0a 40 73 | 61 6d 70 7b 6f 70 65 6e |o the.@s|amp{open|
|000061b0| 6c 6f 67 28 29 7d 20 63 | 61 6c 6c 2c 20 61 6e 64 |log()} c|all, and|
|000061c0| 20 74 68 65 20 6d 65 73 | 73 61 67 65 20 69 73 20 | the mes|sage is |
|000061d0| 66 6f 72 6d 61 74 74 65 | 64 20 69 6e 74 6f 20 61 |formatte|d into a|
|000061e0| 20 62 75 66 66 65 72 20 | 61 6e 64 0a 70 61 73 73 | buffer |and.pass|
|000061f0| 65 64 20 74 6f 20 40 63 | 6f 64 65 7b 73 79 73 6c |ed to @c|ode{sysl|
|00006200| 6f 67 7d 2e 0a 0a 4e 6f | 74 65 20 74 68 61 74 20 |og}...No|te that |
|00006210| 73 69 6e 63 65 20 74 68 | 65 20 65 78 74 72 61 20 |since th|e extra |
|00006220| 61 72 67 75 6d 65 6e 74 | 73 20 74 6f 20 40 63 6f |argument|s to @co|
|00006230| 64 65 7b 63 6f 6d 5f 65 | 72 72 7d 20 61 72 65 20 |de{com_e|rr} are |
|00006240| 70 61 73 73 65 64 20 62 | 79 0a 72 65 66 65 72 65 |passed b|y.refere|
|00006250| 6e 63 65 20 76 69 61 20 | 74 68 65 20 40 63 6f 64 |nce via |the @cod|
|00006260| 65 7b 76 61 5f 6c 69 73 | 74 7d 20 76 61 6c 75 65 |e{va_lis|t} value|
|00006270| 20 40 63 6f 64 65 7b 61 | 72 67 73 7d 2c 20 74 68 | @code{a|rgs}, th|
|00006280| 65 20 68 6f 6f 6b 20 72 | 6f 75 74 69 6e 65 20 6d |e hook r|outine m|
|00006290| 61 79 0a 70 6c 61 63 65 | 20 61 6e 79 20 66 6f 72 |ay.place| any for|
|000062a0| 6d 20 6f 66 20 69 6e 74 | 65 72 70 72 65 74 61 74 |m of int|erpretat|
|000062b0| 69 6f 6e 20 6f 6e 20 74 | 68 65 6d 2c 20 69 6e 63 |ion on t|hem, inc|
|000062c0| 6c 75 64 69 6e 67 20 69 | 67 6e 6f 72 69 6e 67 20 |luding i|gnoring |
|000062d0| 74 68 65 6d 2e 20 20 46 | 6f 72 0a 63 6f 6e 73 69 |them. F|or.consi|
|000062e0| 73 74 65 6e 63 79 2c 20 | 40 63 6f 64 65 7b 70 72 |stency, |@code{pr|
|000062f0| 69 6e 74 66 7d 2d 73 74 | 79 6c 65 20 69 6e 74 65 |intf}-st|yle inte|
|00006300| 72 70 72 65 74 61 74 69 | 6f 6e 20 69 73 20 73 75 |rpretati|on is su|
|00006310| 67 67 65 73 74 65 64 2c | 20 76 69 61 0a 40 63 6f |ggested,| via.@co|
|00006320| 64 65 7b 76 73 70 72 69 | 6e 74 66 7d 20 28 6f 72 |de{vspri|ntf} (or|
|00006330| 20 40 63 6f 64 65 7b 5f | 64 6f 70 72 6e 74 7d 20 | @code{_|doprnt} |
|00006340| 6f 6e 20 42 53 44 20 73 | 79 73 74 65 6d 73 20 77 |on BSD s|ystems w|
|00006350| 69 74 68 6f 75 74 20 66 | 75 6c 6c 20 73 75 70 70 |ithout f|ull supp|
|00006360| 6f 72 74 20 66 6f 72 0a | 74 68 65 20 41 4e 53 49 |ort for.|the ANSI|
|00006370| 20 43 20 6c 69 62 72 61 | 72 79 29 2e 0a 0a 40 73 | C libra|ry)...@s|
|00006380| 65 63 74 69 6f 6e 20 43 | 6f 64 69 6e 67 20 43 6f |ection C|oding Co|
|00006390| 6e 76 65 6e 74 69 6f 6e | 73 0a 0a 54 68 65 20 66 |nvention|s..The f|
|000063a0| 6f 6c 6c 6f 77 69 6e 67 | 20 63 6f 6e 76 65 6e 74 |ollowing| convent|
|000063b0| 69 6f 6e 73 20 61 72 65 | 20 6a 75 73 74 20 73 6f |ions are| just so|
|000063c0| 6d 65 20 67 65 6e 65 72 | 61 6c 20 73 74 79 6c 69 |me gener|al styli|
|000063d0| 73 74 69 63 20 63 6f 6e | 76 65 6e 74 69 6f 6e 73 |stic con|ventions|
|000063e0| 0a 74 6f 20 66 6f 6c 6c | 6f 77 20 77 68 65 6e 20 |.to foll|ow when |
|000063f0| 77 72 69 74 69 6e 67 20 | 72 6f 62 75 73 74 20 6c |writing |robust l|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.